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
{{ message }}
Repository navigation
Deprecate 32 and 64 bits integer types support #4442
I am not saying that fixed point is not useful :-) I am just saying that in the context of image processing, I don't see much applications with more then 16 bits int, but I am pretty sure that I am mistaken here 😄
Yes, this is made by checking np.issubdtype(img.dtype, np.integer) and img.dtype.itemsize < 3, mainly in the skimage.util.dtype module... It will hopefully impact a great majority of the package.
We may also apply this check in some specific modules/ functions where it makes sens, I think about skimage.color, but there is probably more...
We may then specify in the user guide data types section that we don't recommend the use of 32 and 64 bits integers.
I think this discussion needs to take place in the context of #3009. I generally advocate for deprecating implicit rescaling in the library altogether. In that case, it doesn't make sense to deprecate those dtypes.
It does make sense to deprecate rescaling of int32 range to [0, 1]. I've never encountered a case where that was a good idea.
Activity
hmaarrfk commentedon Feb 11, 2020
Fixed point math is quite useful. I wouldn't throw it away because of convenience.
What does deprecating a datatype mean in python? Do we have to check at every entry point that we don't have int32? Seems tiresome.
What about checking for int24? Or other strange datatypes.
rfezzani commentedon Feb 11, 2020
I am not saying that fixed point is not useful :-) I am just saying that in the context of image processing, I don't see much applications with more then 16 bits int, but I am pretty sure that I am mistaken here 😄
Yes, this is made by checking
np.issubdtype(img.dtype, np.integer) and img.dtype.itemsize < 3, mainly in theskimage.util.dtypemodule... It will hopefully impact a great majority of the package.We may also apply this check in some specific modules/ functions where it makes sens, I think about
skimage.color, but there is probably more...We may then specify in the user guide data types section that we don't recommend the use of 32 and 64 bits integers.
rfezzani commentedon Feb 11, 2020
I see in the user guide data types section that With a few exceptions, 64-bit (u)int images are not supported. already 😄
jni commentedon Feb 11, 2020
I think this discussion needs to take place in the context of #3009. I generally advocate for deprecating implicit rescaling in the library altogether. In that case, it doesn't make sense to deprecate those dtypes.
It does make sense to deprecate rescaling of int32 range to [0, 1]. I've never encountered a case where that was a good idea.