You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to fix the following behavior of the BloscCodec:
# /// script# requires-python = ">=3.11"# dependencies = [# "zarr@git+https://github.com/zarr-developers/zarr-python.git@main",# ]# ///## This script automatically imports the development branch of zarr to check for issuesfromzarr.codecsimportBloscCodecb=BloscCodec()
b.to_dict()
# ValueError: `typesize` needs to be set for serialization.
This means picking usable defaults instead of creating a completely broken object.
Unfortunately I am not sure how to gracefully fix this, since we have load-bearing internal code that relies on certain BloscCodec fields being set to None.
here is a concrete solution that would be backwards-compatible:
We add a new attribute to the Codec API that defines which of the other codec attributes can be re-set in the context of a codec pipeline. Codec creation would look like this:
# The itemsize can be tuned in the codec pipelinecompressor=BloscCodec(typesize=2, tunable={"itemsize"})
# The itemsize _cannot_ be tuned in the codec pipelinecompressor=BloscCodec(typesize=2, tunable={})
obviously evolve_from_array_spec would have to respect the contents of the tunable attribute
Activity
d-v-b commentedon Sep 25, 2025
here is a concrete solution that would be backwards-compatible:
We add a new attribute to the
CodecAPI that defines which of the other codec attributes can be re-set in the context of a codec pipeline. Codec creation would look like this:obviously
evolve_from_array_specwould have to respect the contents of thetunableattribute