Skip to content

Commit

Permalink
Allow write_empty_chunks to be set in Zarr encoding (#6348)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwhite authored Mar 17, 2022
1 parent 95bb9ae commit 53172cb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion xarray/backends/zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,13 @@ def extract_zarr_variable_encoding(
"""
encoding = variable.encoding.copy()

valid_encodings = {"chunks", "compressor", "filters", "cache_metadata"}
valid_encodings = {
"chunks",
"compressor",
"filters",
"cache_metadata",
"write_empty_chunks",
}

if raise_on_invalid:
invalid = [k for k in encoding if k not in valid_encodings]
Expand Down

0 comments on commit 53172cb

Please sign in to comment.