Skip to content

Commit

Permalink
Bugfix: from array with data chunks.
Browse files Browse the repository at this point in the history
  • Loading branch information
CSSFrancis committed Jan 17, 2024
1 parent 4301190 commit 995818c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rsciio/_hierarchical.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,9 @@ def _read_array(group, dataset_key):
# cast to a numpy array to avoid multiple calls to
# _decode_chunk in zarr (or h5py)
data = da.from_array(data, chunks=data.chunks)
shape = da.from_array(ragged_shape, chunks=ragged_shape.chunks)
shape = shape.rechunk(data.chunks)
shape = da.from_array(
ragged_shape, chunks=data.chunks
) # same chunks as data
data = da.apply_gufunc(unflatten_data, "(),()->()", data, shape)
return data

Expand Down

0 comments on commit 995818c

Please sign in to comment.