diff --git a/src/zarr/core/array.py b/src/zarr/core/array.py index 564d0e915a..486216fa32 100644 --- a/src/zarr/core/array.py +++ b/src/zarr/core/array.py @@ -1235,24 +1235,28 @@ def basename(self) -> str: @property def cdata_shape(self) -> tuple[int, ...]: """ - The shape of the chunk grid for this array. + The number of chunks along each dimension. + + When sharding is used, this counts inner chunks (not shards) per dimension. Returns ------- tuple[int, ...] - The shape of the chunk grid for this array. + The number of chunks along each dimension. """ return self._chunk_grid_shape @property def _chunk_grid_shape(self) -> tuple[int, ...]: """ - The shape of the chunk grid for this array. + The number of chunks along each dimension. + + When sharding is used, this counts inner chunks (not shards) per dimension. Returns ------- tuple[int, ...] - The shape of the chunk grid for this array. + The number of chunks along each dimension. """ return tuple(starmap(ceildiv, zip(self.shape, self.chunks, strict=True))) @@ -2399,14 +2403,23 @@ def compressors(self) -> tuple[Numcodec, ...] | tuple[BytesBytesCodec, ...]: @property def cdata_shape(self) -> tuple[int, ...]: """ - The shape of the chunk grid for this array. + The number of chunks along each dimension. + + When sharding is used, this counts inner chunks (not shards) per dimension. """ return self.async_array._chunk_grid_shape @property def _chunk_grid_shape(self) -> tuple[int, ...]: """ - The shape of the chunk grid for this array. + The number of chunks along each dimension. + + When sharding is used, this counts inner chunks (not shards) per dimension. + + Returns + ------- + tuple[int, ...] + The number of chunks along each dimension. """ return self.async_array._chunk_grid_shape