Skip to content

Commit

Permalink
Ensure single truth-value.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 588014819
  • Loading branch information
jan-matthis authored and copybara-github committed Dec 6, 2023
1 parent 08ca868 commit 6bd2cc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion connectomics/volume/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def _active_contours_mask(
_cast_img(data, 'float64').squeeze(),
num_iter=num_iter_chan_vese).astype(bool)
if background is not None:
mask = ~mask if mask[background] else mask
mask = ~mask if mask[background].all() else mask
if num_iter_erosion > 0:
mask = scipy.ndimage.binary_erosion(mask, iterations=num_iter_erosion)
if num_iter_dilation > 0:
Expand Down

0 comments on commit 6bd2cc5

Please sign in to comment.