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

Function decode_bytes_array

xarray/coding/strings.py:101–105  ·  view source on GitHub ↗
(bytes_array, encoding="utf-8")

Source from the content-addressed store, hash-verified

99
100
101def decode_bytes_array(bytes_array, encoding="utf-8"):
102 # This is faster than using np.char.decode() or np.vectorize()
103 bytes_array = np.asarray(bytes_array)
104 decoded = [x.decode(encoding) for x in bytes_array.ravel()]
105 return np.array(decoded, dtype=object).reshape(bytes_array.shape)
106
107
108def encode_string_array(string_array, encoding="utf-8"):

Callers

nothing calls this directly

Calls 1

decodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…