Skip to content

docs: fix docstring for Array.cdata_shape#3768

Merged
maxrjones merged 3 commits intozarr-developers:mainfrom
maxrjones:cdata_shape-docstring
Mar 12, 2026
Merged

docs: fix docstring for Array.cdata_shape#3768
maxrjones merged 3 commits intozarr-developers:mainfrom
maxrjones:cdata_shape-docstring

Conversation

@maxrjones
Copy link
Member

The cdata_shape docstring states that it returns the shape of the chunk grid. However, Zarr-Python's internals use the chunk grid to model the outer boundaries (xref #3767). This changes the docstring to align with the implementation, which returns a shape for inner chunks.

This also applies to the function named _chunk_grid_shape. I updated that docstring but chose not to rename to something more technically accurate.

TODO:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/user-guide/*.md
  • Changes documented as a new file in changes/
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

@maxrjones
Copy link
Member Author

Or maybe this was just a bug? It's confusing why there's a .chunks and a .cdata_shape.

@d-v-b
Copy link
Contributor

d-v-b commented Mar 11, 2026

cdata_shape is from zarr python 2.x

@maxrjones maxrjones added the documentation Improvements to the documentation label Mar 11, 2026
@maxrjones maxrjones merged commit a02d996 into zarr-developers:main Mar 12, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements to the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants