Skip to content

Commit d96c202

Browse files
committed
chunk info
1 parent 5599da3 commit d96c202

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/zarr/core/array.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,8 +1235,12 @@ def _info(self, extra: dict[str, int] | None = None) -> ArrayInfo:
12351235
kwargs["codecs"] = str(self.metadata.codecs)
12361236
kwargs["data_type"] = str(self.metadata.data_type)
12371237
# just regular?
1238-
if isinstance(self.metadata.chunk_grid, RegularChunkGrid):
1239-
kwargs["chunk_shape"] = self.metadata.chunk_grid.chunk_shape
1238+
chunk_grid = self.metadata.chunk_grid
1239+
if isinstance(chunk_grid, RegularChunkGrid):
1240+
kwargs["chunk_shape"] = chunk_grid.chunk_shape
1241+
else:
1242+
msg = f"'info' is not yet implemented for chunk grids of type {type(self.metadata.chunk_grid)}"
1243+
raise NotImplementedError(msg)
12401244

12411245
return ArrayInfo(
12421246
zarr_format=self.metadata.zarr_format,

0 commit comments

Comments
 (0)