Skip to content

Commit d0229c5

Browse files
committed
Fix: ignore scalar data
1 parent 39dc4e1 commit d0229c5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kaleidoscope/operators/randomizeop.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ def run(self, source: Dataset) -> Dataset: # noqa: D102
4646
for name, array in source.data_vars.items():
4747
if array.dtype.kind != "f":
4848
continue
49+
if array.ndim < 1:
50+
continue
4951
f = Randomize(array.dtype, array.ndim, array.ndim)
5052
source[name] = DataArray(
5153
data=f.apply_to(array.data, test=self._args.test),

0 commit comments

Comments
 (0)