MCPcopy
hub / github.com/pydata/xarray / decode

Method decode

xarray/coding/strings.py:167–174  ·  view source on GitHub ↗
(self, variable, name=None)

Source from the content-addressed store, hash-verified

165 return Variable(dims, data, attrs, encoding)
166
167 def decode(self, variable, name=None):
168 dims, data, attrs, encoding = unpack_for_decoding(variable)
169
170 if data.dtype == "S1" and dims:
171 encoding["char_dim_name"] = dims[-1]
172 dims = dims[:-1]
173 data = char_to_bytes(data)
174 return Variable(dims, data, attrs, encoding)
175
176
177def bytes_to_char(arr):

Calls 3

VariableClass · 0.90
unpack_for_decodingFunction · 0.85
char_to_bytesFunction · 0.85