Skip to content

Commit

Permalink
fix two
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Jan 6, 2025
1 parent 7077fae commit ffeb009
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions xarray/backends/zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,9 @@ def extract_zarr_variable_encoding(
mode=mode,
shape=shape,
)
encoding["chunks"] = chunks or "auto"
if _zarr_v3() and chunks is None:
chunks = "auto"
encoding["chunks"] = chunks
return encoding


Expand Down Expand Up @@ -827,9 +829,10 @@ def open_store_variable(self, name):
{
"compressors": zarr_array.compressors,
"filters": zarr_array.filters,
# "serializer": zarr_array.serializer,
}
)
if self.zarr_group.metadata.zarr_format == 3:
encoding.update({"serializer": zarr_array.serializer})
else:
encoding.update(
{
Expand Down

0 comments on commit ffeb009

Please sign in to comment.