We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70a4876 commit 35b4891Copy full SHA for 35b4891
1 file changed
src/zarr/core/array.py
@@ -1217,7 +1217,11 @@ def shard_grid_shape(self) -> ChunkCoords:
1217
tuple[int, ...]
1218
The shape of the shard grid for this array.
1219
"""
1220
- return tuple(starmap(ceildiv, zip(self.shape, self.shards, strict=True)))
+ if self.shards is None:
1221
+ shard_shape = self.chunks
1222
+ else:
1223
+ shard_shape = self.shards
1224
+ return tuple(starmap(ceildiv, zip(self.shape, shard_shape, strict=True)))
1225
1226
@property
1227
def nchunks(self) -> int:
0 commit comments