Skip to content

Commit

Permalink
added stacklevel
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyminium committed Apr 4, 2019
1 parent 8571131 commit a70205a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xarray/backends/zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def encode_zarr_variable(var, needs_copy=True, name=None):
# zarr allows unicode, but not variable-length strings, so it's both
# simpler and more compact to always encode as UTF-8 explicitly.
# TODO: allow toggling this explicitly via dtype in encoding.
coder = coding.strings.EncodedStringCoder(allows_unicode=False)
coder = coding.strings.EncodedStringCoder(allows_unicode=True)
var = coder.encode(var, name=name)
var = coding.strings.ensure_fixed_length_bytes(var)

Expand Down Expand Up @@ -507,7 +507,8 @@ def get_chunk(name, var, chunks):
"dimension %r. This significantly "
"degrades performance. Consider "
"rechunking after loading instead."
% (chunks[dim], chunk_spec[dim], dim))
% (chunks[dim], chunk_spec[dim], dim),
stacklevel=2)
chunk_spec[dim] = chunks[dim]
return chunk_spec

Expand Down

0 comments on commit a70205a

Please sign in to comment.