Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Fixed python2 integer division
Browse files Browse the repository at this point in the history
  • Loading branch information
Luca Kubin committed Nov 13, 2019
1 parent 676f840 commit 50abb88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/mxnet/image/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 50abb88

Please sign in to comment.