mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-03 09:11:28 +08:00
Fix label casting for numpy 1.7.
This commit is contained in:
@@ -66,7 +66,8 @@ def remove_small_objects(ar, min_size=64, connectivity=1, in_place=False):
|
||||
|
||||
if out.dtype == bool:
|
||||
selem = nd.generate_binary_structure(ar.ndim, connectivity)
|
||||
ccs = nd.label(ar, selem)[0]
|
||||
ccs = np.zeros_like(ar, dtype=np.int)
|
||||
nd.label(ar, selem, output=ccs)
|
||||
else:
|
||||
ccs = out
|
||||
|
||||
|
||||
Reference in New Issue
Block a user