Skip to content

Commit ffeb009

Browse files
committed
fix two
1 parent 7077fae commit ffeb009

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

xarray/backends/zarr.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,9 @@ def extract_zarr_variable_encoding(
481481
mode=mode,
482482
shape=shape,
483483
)
484-
encoding["chunks"] = chunks or "auto"
484+
if _zarr_v3() and chunks is None:
485+
chunks = "auto"
486+
encoding["chunks"] = chunks
485487
return encoding
486488

487489

@@ -827,9 +829,10 @@ def open_store_variable(self, name):
827829
{
828830
"compressors": zarr_array.compressors,
829831
"filters": zarr_array.filters,
830-
# "serializer": zarr_array.serializer,
831832
}
832833
)
834+
if self.zarr_group.metadata.zarr_format == 3:
835+
encoding.update({"serializer": zarr_array.serializer})
833836
else:
834837
encoding.update(
835838
{

0 commit comments

Comments
 (0)