From 50abb884570e13900df3b0af96ff046894074491 Mon Sep 17 00:00:00 2001 From: Luca Kubin Date: Wed, 13 Nov 2019 10:56:00 +0100 Subject: [PATCH] Fixed python2 integer division --- python/mxnet/image/image.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)