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:
Tony S Yu
2012-02-03 15:46:43 -05:00
parent cfc1dfa16b
commit 078ed488c8
+1 -1
View File
@@ -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