Skip to content

Commit e5d83ba

Browse files
committed
allow space and time axes to be singletons
1 parent f6c3bd7 commit e5d83ba

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

bioimageio/core/axis.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,8 @@ def create(cls, axis: AxisLike, maybe_singleton: Optional[bool] = None) -> AxisI
8080

8181
axis_base = super().create(axis)
8282
if maybe_singleton is None:
83-
if isinstance(axis, Axis):
84-
maybe_singleton = axis.type in ("batch", "channel", "index")
85-
elif isinstance(axis, str):
86-
maybe_singleton = axis in ("b", "c", "i")
83+
if isinstance(axis, (Axis, str)):
84+
maybe_singleton = True
8785
else:
8886
if axis.size is None:
8987
maybe_singleton = True

0 commit comments

Comments
 (0)