Skip to content

Commit 8ccff7c

Browse files
authored
ensure consistent chunking (#29)
1 parent c938722 commit 8ccff7c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/napari_iohub/_reader.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,14 +309,16 @@ def plate_to_layers(
309309
first_blocks = next(a for a in plate_arrays[0] if a is not None)
310310
fill_args = [(b.shape, b.dtype) for b in first_blocks]
311311
plate_levels = []
312-
for level, _ in enumerate(first_blocks):
312+
for level, first_block in enumerate(first_blocks):
313313
plate_level = []
314314
for r in plate_arrays:
315315
row_level = []
316316
for c in r:
317317
if c is None:
318318
arr = da.zeros(
319-
shape=fill_args[level][0], dtype=fill_args[level][1]
319+
shape=fill_args[level][0],
320+
dtype=fill_args[level][1],
321+
chunks=first_block.chunksize,
320322
)
321323
else:
322324
arr = c[level]

0 commit comments

Comments
 (0)