Skip to content

Commit

Permalink
Merge pull request #9 from fmi-faim/fix-all2d-dataarray
Browse files Browse the repository at this point in the history
Initialize chunks correctly with empty channels_3d
  • Loading branch information
imagejan authored Oct 9, 2024
2 parents 2c42b0d + 9e92f81 commit 7476a0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/metamorph_mda_parser/xarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def _load_file(row, channels_3d: list[bool]):
time = row['time']
channel = row['channel']

chunks = (-1,) * (3 if channels_3d[channel] else 2)
chunks = (-1,) * (2 if not channels_3d or not channels_3d[channel] else 3)
with imread(path, aszarr=True) as store:
data = da.from_zarr(store, chunks=chunks)

Expand Down

0 comments on commit 7476a0c

Please sign in to comment.