Skip to content

Commit 91cba69

Browse files
authored
Merge branch 'main' into feat/memory-store-registry
2 parents 032e512 + a02d996 commit 91cba69

1 file changed

Lines changed: 19 additions & 6 deletions

File tree

src/zarr/core/array.py

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,24 +1235,28 @@ def basename(self) -> str:
12351235
@property
12361236
def cdata_shape(self) -> tuple[int, ...]:
12371237
"""
1238-
The shape of the chunk grid for this array.
1238+
The number of chunks along each dimension.
1239+
1240+
When sharding is used, this counts inner chunks (not shards) per dimension.
12391241
12401242
Returns
12411243
-------
12421244
tuple[int, ...]
1243-
The shape of the chunk grid for this array.
1245+
The number of chunks along each dimension.
12441246
"""
12451247
return self._chunk_grid_shape
12461248

12471249
@property
12481250
def _chunk_grid_shape(self) -> tuple[int, ...]:
12491251
"""
1250-
The shape of the chunk grid for this array.
1252+
The number of chunks along each dimension.
1253+
1254+
When sharding is used, this counts inner chunks (not shards) per dimension.
12511255
12521256
Returns
12531257
-------
12541258
tuple[int, ...]
1255-
The shape of the chunk grid for this array.
1259+
The number of chunks along each dimension.
12561260
"""
12571261
return tuple(starmap(ceildiv, zip(self.shape, self.chunks, strict=True)))
12581262

@@ -2399,14 +2403,23 @@ def compressors(self) -> tuple[Numcodec, ...] | tuple[BytesBytesCodec, ...]:
23992403
@property
24002404
def cdata_shape(self) -> tuple[int, ...]:
24012405
"""
2402-
The shape of the chunk grid for this array.
2406+
The number of chunks along each dimension.
2407+
2408+
When sharding is used, this counts inner chunks (not shards) per dimension.
24032409
"""
24042410
return self.async_array._chunk_grid_shape
24052411

24062412
@property
24072413
def _chunk_grid_shape(self) -> tuple[int, ...]:
24082414
"""
2409-
The shape of the chunk grid for this array.
2415+
The number of chunks along each dimension.
2416+
2417+
When sharding is used, this counts inner chunks (not shards) per dimension.
2418+
2419+
Returns
2420+
-------
2421+
tuple[int, ...]
2422+
The number of chunks along each dimension.
24102423
"""
24112424
return self.async_array._chunk_grid_shape
24122425

0 commit comments

Comments
 (0)