Skip to content

Only use None for "no filters" #2842

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

Closed
d-v-b opened this issue Feb 16, 2025 · 2 comments · Fixed by #2847
Closed

Only use None for "no filters" #2842

d-v-b opened this issue Feb 16, 2025 · 2 comments · Fixed by #2847

Comments

@d-v-b
Copy link
Contributor

d-v-b commented Feb 16, 2025

In v2, we allow filters to be an empty array. But the v2 spec states that filters should be an array with at least one element, or None. So we should fix our implementation, and no longer generate metadata with an empty array of filters. For backwards compatibility, we should read the empty array of filters, and probably emit a warning.

@leuchthelp
Copy link

leuchthelp commented Feb 17, 2025

#2841 (comment)

Linking the discussion for context. Can also show up when creating a format=3 zarr file, but I do not know if it might be intended for zarr format=3.

@d-v-b
Copy link
Contributor Author

d-v-b commented Feb 20, 2025

#2841 (comment)

Linking the discussion for context. Can also show up when creating a format=3 zarr file, but I do not know if it might be intended for zarr format=3.

in the case of zarr v3, "filters" is a shorthand name for a type of codec that transforms arrays into arrays, and we do want to represent 0 of them as an empty tuple, so I don't think there's a problem there.

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 a pull request may close this issue.

2 participants