Skip to content

Commit 83a3ea5

Browse files
committed
rename chunks_initialized to shards_initialized
1 parent ec5e0f1 commit 83a3ea5

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/zarr/core/array.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,7 @@ async def nchunks_initialized(self) -> int:
12601260
>>> await arr.nchunks_initialized()
12611261
3
12621262
"""
1263-
return len(await chunks_initialized(self))
1263+
return len(await shards_initialized(self))
12641264

12651265
async def nbytes_stored(self) -> int:
12661266
return await self.store_path.store.getsize_prefix(self.store_path.path)
@@ -3953,7 +3953,7 @@ def info_complete(self) -> Any:
39533953
return sync(self._async_array.info_complete())
39543954

39553955

3956-
async def chunks_initialized(
3956+
async def shards_initialized(
39573957
array: AsyncArray[ArrayV2Metadata] | AsyncArray[ArrayV3Metadata],
39583958
) -> tuple[str, ...]:
39593959
"""

tests/test_array.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
FiltersLike,
3434
_parse_chunk_encoding_v2,
3535
_parse_chunk_encoding_v3,
36-
chunks_initialized,
3736
create_array,
3837
default_filters_v2,
3938
default_serializer_v3,
@@ -42,6 +41,7 @@
4241
iter_shard_coords,
4342
iter_shard_keys,
4443
iter_shard_regions,
44+
shards_initialized,
4545
)
4646
from zarr.core.buffer import NDArrayLike, NDArrayLikeOrScalar, default_buffer_prototype
4747
from zarr.core.chunk_grids import _auto_partition
@@ -431,7 +431,7 @@ async def test_chunks_initialized(
431431
)
432432
for keys, region in zip(chunks_accumulated, arr._iter_shard_regions(), strict=False):
433433
arr[region] = 1
434-
observed = sorted(await chunks_initialized(arr._async_array))
434+
observed = sorted(await shards_initialized(arr._async_array))
435435
expected = sorted(keys)
436436
assert observed == expected
437437

0 commit comments

Comments
 (0)