Skip to content
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

Add wrappers for zarr v3 #524

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Add wrappers for zarr v3 #524

wants to merge 5 commits into from

Conversation

normanrz
Copy link

@normanrz normanrz commented May 6, 2024

The Zarr v3 specification only lists a few codecs that are officially supported. However, it is desirable to expose the codecs in numcodecs for use with v3 arrays as well. This PR adds wrapper classes for numcodecs support.

The name of the codecs is prefixed with https://zarr.dev/numcodecs/ to avoid naming collisions in case some codecs of numcodecs get added to the Zarr spec. Also, there is a warning that numcodecs codecs are not officially supported and will likely not work in any other Zarr implementation.

Most array-to-array ("filters") and bytes-to-bytes codecs are supported. Absent are the variable-length codecs as well as json, msgpack and pickle.

Here is an example of the persisted configuration:

{
  "name": "https://zarr.dev/numcodecs/fixedoffsetscale",
  "configuration": {"offset": 0, "scale": 51, "astype": "uint16"}
}

Use of numcodecs in v2 arrays is not affected.

Fixes #502

@pep8speaks
Copy link

pep8speaks commented May 6, 2024

Hello @normanrz! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2024-05-08 20:53:05 UTC

@normanrz normanrz changed the title Add wrappers for zarr v3 [DRAFT] Add wrappers for zarr v3 May 6, 2024
@MSanKeys963 MSanKeys963 requested a review from jakirkham May 8, 2024 16:20
@normanrz normanrz changed the title [DRAFT] Add wrappers for zarr v3 Add wrappers for zarr v3 May 8, 2024
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.

Supporting Zarr-Python 3 Codec API
2 participants