diff --git a/python/mxnet/image/image.py b/python/mxnet/image/image.py index 8865ba67f651..799181b172ab 100644 --- a/python/mxnet/image/image.py +++ b/python/mxnet/image/image.py @@ -676,8 +676,8 @@ def imrotate(src, rotation_degrees, zoom_in=False, zoom_out=False): _, _, h, w = src.shape # Generate a grid centered at the center of the image - hscale = ((h - 1) / 2) - wscale = ((w - 1) / 2) + hscale = (float(h - 1) / 2) + wscale = (float(w - 1) / 2) h_matrix = ( nd.repeat(nd.arange(h, ctx=src.context).astype('float32').reshape(h, 1), w, axis=1) - hscale ).expand_dims(axis=0)