Skip to content

Commit

Permalink
Initialize chunks correctly with empty channels_3d
Browse files Browse the repository at this point in the history
  • Loading branch information
imagejan committed Oct 9, 2024
1 parent 2c42b0d commit 9e92f81
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 9e92f81

Please sign in to comment.