-
-
Notifications
You must be signed in to change notification settings - Fork 327
TypeError when passing old numcodecs to zarr v3 #2964
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
Comments
@normanrz - you know this part of the code best. Do you think its reasonable for us to cast vanilla numcodecs codecs to zarr3 codecs? Seems like we have everything we need to make the right decisions here. |
Note that if I change the compressors line to this then it works compressors = [zarr.codecs.BloscCodec(cname="zstd", clevel=3, shuffle="shuffle")] |
Yes, upcasting is certainly possible. Whether to do that here in zarr or in numcodecs invokes the usual cyclic dependency issue. My gut feeling would be that a |
just adding weight to this ticket... [v3.0.6] looking forward to the unified/aligned implementation, thanks devteam! |
We really need this to work, because it's preventing people using this pattern to move their zarr v2 data into zarr v3 data via xarray: ds = xr.open_zarr('store-v2.zarr')
ds.to_zarr('store-v3.zarr') |
Bumping for priority here; also impacting an upgrade to a production workflow that I'd like to quickly migrate to Zarr v3. |
|
Confirm that the defaults all work just fine when writing a new Still looking for clarity on defining custom encoding/compressors. The workflow I'm migrating to Zarr v3 previously had some fine-tuning done to create a compression scheme that balanced output size and runtime. Using the original way to setup this up - e.g. instantiate a |
I made a draft for this in zarr-developers/numcodecs#741. feel free to leave a comment. |
Zarr version
v3.0.6
Numcodecs version
v0.16.0
Python Version
3.13
Operating System
mac
Installation
uv
Description
Passing the old stype of numcodecs codec to zarr raises a
TypeError
, when this scenario could be detected and upcast into the zarr-v3-compatible version of that codec instead.This has been reported by a lot of xarray users (pydata/xarray#10032) as well as here #2710 (comment).
Steps to reproduce
Additional output
No response
The text was updated successfully, but these errors were encountered: