Skip to content

Allow 'chunks' as an alias for 'chunk_shape' in array creation #1991

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

tomwhite
Copy link
Contributor

This is a compatibility fix for v3.

It should fix #1965 - although I haven't tested it directly.

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/tutorial.rst
  • Changes documented in docs/release.rst
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

chunk_shape = chunks
chunks = None
else:
chunk_shape = shape
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this actually a good fallback? Perhaps worth bringing in guess_chunks from the v2 codebase (in a later PR).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree - I was just changing one thing here.

@d-v-b d-v-b merged commit 5a4a50f into zarr-developers:v3 Jun 25, 2024
18 checks passed
dcherian added a commit to dcherian/zarr-python that referenced this pull request Jul 25, 2024
* v3:
  Allow 'chunks' as an alias for 'chunk_shape' in array creation. (zarr-developers#1991)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dask array to_zarr() broken with zarr 3.0.0a1
2 participants