mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-13 14:46:57 +08:00
Fix casting error when converting from int8 to uint16.
This error only comes up in development versions of numpy, which refuses to cast the input to the correct type for inplace operations.
This commit is contained in:
@@ -120,7 +120,7 @@ def _convert(image, dtype):
|
||||
# int8 -> uint32
|
||||
image = dtype(image)
|
||||
image *= 2**16 + 2**8 + 1
|
||||
result += image
|
||||
result += dtype(image)
|
||||
return result
|
||||
if kind == 'i':
|
||||
# signed integer -> signed integer
|
||||
|
||||
Reference in New Issue
Block a user