Closed tcompa closed 5 months ago
This fails as expected, with this relevant part of the traceback:
if len(set(shapes)) > 1:
raise ValueError(
"Shape mismatch:\n"
f"{current_label_region.shape=}\n"
f"{masking_label_region.shape=}\n"
f"{image_array.shape=}"
)
# Compute background mask
background_3D = masking_label_region != label_value
if (masking_label_region == label_value).sum() == 0:
raise ValueError(
f"Label {label_value} is not present in the extracted ROI"
)
# Set image background to zero
background_4D = np.expand_dims(background_3D, axis=0)
> image_array[background_4D] = 0
E IndexError: boolean index did not match indexed array along dimension 0; dimension is 2 but corresponding boolean dimension is 1
fractal_tasks_core/masked_loading.py:174: IndexError
This PR is just to show a failing test that encodes issue #640