Skip to content

Commit

Permalink
Change np.core.defchararray to np.char.chararray (pydata#9165)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pont-us committed Jun 24, 2024
1 parent 872c1c5 commit a5158e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xarray/testing/assertions.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def wrapper(*args, **kwargs):

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


Expand Down

0 comments on commit a5158e8

Please sign in to comment.