Skip to content

Commit 09e2bc5

Browse files
committed
refactor: more cleanup
1 parent 1889212 commit 09e2bc5

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

src/zarr/codecs/sharding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ async def _encode_single(
574574
chunk_grid=RegularChunkGrid(chunk_shape=chunk_shape),
575575
)
576576
)
577-
shard_builder = dict.fromkeys(np.array(list(np.ndindex(chunks_per_shard))))
577+
shard_builder = dict.fromkeys(self._subchunk_order_iter(chunks_per_shard, "lexicographic"))
578578

579579
await self.codec_pipeline.write(
580580
[

tests/test_codecs/test_sharding.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,6 @@ async def test_unordered_can_be_seeded() -> None:
649649
subchunk_write_order="unordered",
650650
rng=np.random.default_rng(seed=seed),
651651
)
652-
# The physical write order is recovered by sorting coordinates by start offset.
653652
orders.append(await stored_data_and_get_order(codec, chunks_per_shard))
654653
assert all(orders[0] == o for o in orders)
655654

0 commit comments

Comments
 (0)