You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
skimage.util.crop fails when passed a numpy integer object. See numpy/numpy#2951 for discussion as to why. I believe the fix is to check for numbers.Integral (I'll send PR)
Way to reproduce
importnumpyasnpfromskimage.utilimportcropimage=np.arange(100).reshape(10,10)
# this workscrop(image, 2)
# this breakscrop(image, np.int64(2))
# this comes up when doing something likeforcrop_factorinnp.arange(2,10):
tmp=crop(image, crop_factor)
# do something
Version information
# Paste the output of the following python commandsfrom __future__ importprint_functionimportsys; print(sys.version)
importplatform; print(platform.platform())
importskimage; print("scikit-image version: {}".format(skimage.__version__))
importnumpy; print("numpy version: {}".format(numpy.__version__))
Description
skimage.util.crop
fails when passed a numpy integer object. See numpy/numpy#2951 for discussion as to why. I believe the fix is to check fornumbers.Integral
(I'll send PR)Way to reproduce
Version information
The text was updated successfully, but these errors were encountered: