Skip to content

Commit

Permalink
Don't run encoding check if it wasn't provided.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed May 8, 2024
1 parent 26b0bb5 commit 942e1dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xarray/backends/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1684,7 +1684,7 @@ def to_zarr(
f"``region`` with to_zarr(), got {append_dim} in both"
)

if mode in ["a", "a-", "r+"]:
if encoding and mode in ["a", "a-", "r+"]:
existing_var_names = set(zstore.zarr_group.array_keys())
for var_name in existing_var_names:
if var_name in encoding:
Expand Down

0 comments on commit 942e1dd

Please sign in to comment.