File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/bioimageio/spec/model Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -3540,6 +3540,7 @@ def normalize(
35403540
35413541 def to_2d_image (data : NDArray [Any ], axes : Sequence [AnyAxis ]):
35423542 original_shape = data .shape
3543+ original_axes = list (axes )
35433544 data , axes = squeeze (data , axes )
35443545
35453546 # take slice fom any batch or index axis if needed
@@ -3624,9 +3625,9 @@ def to_2d_image(data: NDArray[Any], axes: Sequence[AnyAxis]):
36243625 data , axes = squeeze (data , axes )
36253626 assert len (axes ) == ndim
36263627
3627- if (has_c_axis and ndim != 3 ) or ndim != 2 :
3628+ if (has_c_axis and ndim != 3 ) or ( not has_c_axis and ndim != 2 ) :
36283629 raise ValueError (
3629- f"Failed to construct cover image from shape { original_shape } "
3630+ f"Failed to construct cover image from shape { original_shape } with axes { [ a . id for a in original_axes ] } . "
36303631 )
36313632
36323633 if not has_c_axis :
You can’t perform that action at this time.
0 commit comments