Skip to content

Commit 8df83c1

Browse files
author
Joseph Hamman
committed
use deterministic dim order in stack
1 parent 7093d78 commit 8df83c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xbatcher/generators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def _drop_input_dims(ds, input_dims, suffix='_input'):
5555

5656

5757
def _maybe_stack_batch_dims(ds, input_dims, stacked_dim_name='sample'):
58-
batch_dims = list(set(ds.dims) - set(input_dims))
58+
batch_dims = [d for d in ds.dims if d not in input_dims]
5959
if len(batch_dims) < 2:
6060
return ds
6161
ds_stack = ds.stack(**{stacked_dim_name: batch_dims})

0 commit comments

Comments
 (0)