Skip to content

Commit a5158e8

Browse files
committed
Change np.core.defchararray to np.char.chararray (pydata#9165)
Replace a reference to np.core.defchararray with np.char.chararray in xarray.testing.assertions, since the former no longer works on NumPy 2.0.0 and the latter is the "preferred alias" according to NumPy docs. See Issue pydata#9165.
1 parent 872c1c5 commit a5158e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xarray/testing/assertions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def wrapper(*args, **kwargs):
3636

3737
def _decode_string_data(data):
3838
if data.dtype.kind == "S":
39-
return np.core.defchararray.decode(data, "utf-8", "replace")
39+
return np.char.chararray.decode(data, "utf-8", "replace")
4040
return data
4141

4242

0 commit comments

Comments
 (0)