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
the error condition here is too restrictive:
MONAI/monai/transforms/utility/array.py
Lines 374 to 375 in ab800d8
e.g. single channel input works fine in numpy (and pytorch):
cc @holgerroth