-
-
Notifications
You must be signed in to change notification settings - Fork 327
Ensure compressor=None results in no compression for V2 #2709
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Ensure compressor=None results in no compression for V2 #2709
Conversation
Co-authored-by: Davis Bennett <davis.v.bennett@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this!
""" | ||
g = zarr.open(store, mode="w", zarr_format=2) | ||
arr = g.create_array("one", dtype="i8", shape=(1,), chunks=(1,), compressor=None) | ||
assert arr._async_array.compressor is None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert arr._async_array.compressor is None | |
assert arr.compressor is None |
Does this work, too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but that's deprecated, apparently
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So should be asyncarray.compressor
. You can also check array.compressors
@dstansby , added release note |
Thanks! |
@martindurant I only just noticed that this PR added a new keyword argument ( |
i should have noticed this in review, but the |
Kerchunk can cope, but this was following the v2 pattern rather than new. The handling of the argument is specifically dependent on the format version requested. Personally, I would have preferred "filters" or something more specific like "codecs". The filters/compressor split before was roughly the same at the array->array/bytes->bytes split we have now. |
|
i opened #2818 to propose removing the |
Right; but before, |
it should still be possible to pass |
Fixes #2708
TODO:
cc @d-v-b