mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-01 09:45:04 +08:00
Remove duplicate contiguous conversion
This commit is contained in:
@@ -41,10 +41,10 @@ def _apply(func8, func16, image, selem, out, mask, shift_x, shift_y, s0, s1):
|
||||
else:
|
||||
mask = np.ascontiguousarray(mask)
|
||||
mask = img_as_ubyte(mask)
|
||||
|
||||
if image is out:
|
||||
raise NotImplementedError("Cannot perform rank operation in place.")
|
||||
|
||||
mask = np.ascontiguousarray(mask)
|
||||
if image.dtype == np.uint8:
|
||||
if func8 is None:
|
||||
raise TypeError("Not implemented for uint8 image.")
|
||||
|
||||
@@ -40,10 +40,10 @@ def _apply(func8, func16, image, selem, out, mask, shift_x, shift_y, p0, p1):
|
||||
else:
|
||||
mask = np.ascontiguousarray(mask)
|
||||
mask = img_as_ubyte(mask)
|
||||
|
||||
if image is out:
|
||||
raise NotImplementedError("Cannot perform rank operation in place.")
|
||||
|
||||
mask = np.ascontiguousarray(mask)
|
||||
if image.dtype == np.uint8:
|
||||
if func8 is None:
|
||||
raise TypeError("Not implemented for uint8 image.")
|
||||
|
||||
@@ -33,10 +33,10 @@ def _apply(func8, func16, image, selem, out, mask, shift_x, shift_y):
|
||||
else:
|
||||
mask = np.ascontiguousarray(mask)
|
||||
mask = img_as_ubyte(mask)
|
||||
|
||||
if image is out:
|
||||
raise NotImplementedError("Cannot perform rank operation in place.")
|
||||
|
||||
mask = np.ascontiguousarray(mask)
|
||||
if image.dtype == np.uint8:
|
||||
if func8 is None:
|
||||
raise TypeError("Not implemented for uint8 image.")
|
||||
|
||||
Reference in New Issue
Block a user