-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Unsupported data type in ConcatItemsD #4741
Copy link
Copy link
Closed
Description
Is your feature request related to a problem? Please describe.
ConcatItemsD only support numpy.ndarray and torch.Tensor now, which is incompatible with MetaTensor data type.
MONAI/monai/transforms/utility/dictionary.py
Lines 969 to 975 in c45b3f0
| if data_type is np.ndarray: | |
| d[self.name] = np.concatenate(output, axis=self.dim) | |
| elif data_type is torch.Tensor: | |
| d[self.name] = torch.cat(output, dim=self.dim) # type: ignore | |
| else: | |
| raise TypeError(f"Unsupported data type: {data_type}, available options are (numpy.ndarray, torch.Tensor).") | |
| return d |
Describe the solution you'd like
Support MetaTensor data type
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels