Skip to content

Commit 720ee01

Browse files
committed
Fix failure with Numpy 1.6. Fixes astropy/imageutils#22.
1 parent 66ce988 commit 720ee01

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎imageutils/array_utils.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ def mask_to_mirrored_num(image, mask_image, center_position, bbox=None):
218218
(x_mirror >= subdata.shape[1]) |
219219
(y_mirror >= subdata.shape[0]))
220220
if outofimage.any():
221-
x_mirror[outofimage] = x_masked[outofimage]
222-
y_mirror[outofimage] = y_masked[outofimage]
221+
x_mirror[outofimage] = x_masked[outofimage].astype('int32')
222+
y_mirror[outofimage] = y_masked[outofimage].astype('int32')
223223

224224
subdata[y_masked, x_masked] = subdata[y_mirror, x_mirror]
225225

0 commit comments

Comments
 (0)