mirror of
https://github.com/wassname/scikit-image.git
synced 2026-10-01 12:31:10 +08:00
Fix label casting for numpy 1.7.
This commit is contained in:
1 parent
504ad94dc6
commit
eb66e34351
1 file changed
+2
-1
@@ -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