mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-13 17:45:20 +08:00
Merge pull request #1026 from stefanv/bugs/watershed_none_comparison
Correctly compare mask to None
This commit is contained in:
@@ -211,7 +211,7 @@ def watershed(image, markers, connectivity=None, offset=None, mask=None):
|
||||
# If nothing is labeled, the output is empty and we don't have to
|
||||
# do anything
|
||||
c_output = c_output.flatten()
|
||||
if c_mask == None:
|
||||
if c_mask is None:
|
||||
c_mask = np.ones(c_image.shape, np.int8).flatten()
|
||||
else:
|
||||
c_mask = c_mask.astype(np.int8).flatten()
|
||||
|
||||
Reference in New Issue
Block a user