You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d2d26d8
Browse filesBrowse the repository at this point in the historyBrowse files
refactor(sharding): store chunks_per_shard explicitly in _ShardIndex
_ShardIndex previously inferred the chunk grid shape from
offsets_and_lengths.shape[:-1]. For 0-D arrays this collapses the array
to rank-1, breaking methods that assume rank >= 2 and forcing a numpy
compat cast workaround.
Store chunks_per_shard as an explicit NamedTuple field instead. This
removes the chunks_per_shard property and its cast, and lets several
call sites use the field directly instead of reverse-engineering it.
Also fix a latent 0-D bug in is_dense, which iterated offsets_and_lengths
assuming rank-2.
Tests for get_chunk_slices_vectorized, _ShardReader.__iter__, and
is_dense are parametrized over chunk grid ranks (0-D, 1-D, 2-D) so 0-D
is exercised as a normal case rather than a special branch.
Closeszarr-developers#3974
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
0 commit comments