Skip to content

SplitDim support chns==1 #6086

@wyli

Description

@wyli

the error condition here is too restrictive:

if n_out <= 1:
raise RuntimeError(f"Input image is singleton along dimension to be split, got shape {img.shape}.")

e.g. single channel input works fine in numpy (and pytorch):

>>> a = np.zeros((1, 256, 256))
>>> s = np.split(a, 1, 0)
>>> len(s)
1

cc @holgerroth

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions