We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99967f3 commit 3be1eb6Copy full SHA for 3be1eb6
1 file changed
src/zarr/core/array.py
@@ -128,6 +128,7 @@
128
ChunkGridMetadata,
129
RectilinearChunkGridMetadata,
130
RegularChunkGridMetadata,
131
+ parse_codecs,
132
parse_node_type_array,
133
resolve_chunks,
134
)
@@ -205,7 +206,10 @@ def _chunk_sizes_from_shape(
205
206
207
def parse_array_metadata(data: object, codec_class_map: Mapping[str, type[Codec]]) -> ArrayMetadata:
208
if isinstance(data, ArrayV3Metadata):
- return type(data).from_dict(data.to_dict(), codec_class_map=codec_class_map)
209
+ new_codecs = parse_codecs(
210
+ [c.to_dict() for c in data.codecs], codec_class_map=codec_class_map
211
+ )
212
+ return replace(data, codecs=new_codecs)
213
elif isinstance(data, ArrayV2Metadata):
214
# V2 arrays get their codecs from numcodecs, for now. the codec class map is not used.
215
return data
0 commit comments