mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-30 07:37:56 +08:00
Merge pull request #36 from amueller/dtype_minor
ENH: numpy 1.5 compat: Don't use dtype argument to np.empty.
This commit is contained in:
@@ -75,9 +75,7 @@ def _convert(image, dtype, prec_loss):
|
||||
|
||||
# Do scaling/shifting calculations in floating point
|
||||
image = image.astype(np.float64)
|
||||
out = np.empty_like(image, dtype=dtype)
|
||||
|
||||
out[:] = round_fn((image - imin) * scale + shift)
|
||||
out = round_fn((image - imin) * scale + shift).astype(dtype)
|
||||
|
||||
return out
|
||||
|
||||
|
||||
Reference in New Issue
Block a user