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 63b145b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rsciio/_hierarchical.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,7 @@ 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 63b145b

Please sign in to comment.