Skip to content

Commit 5e0f91a

Browse files
committed
tidy: Remove no longer needed np-special casing
np.astype became available in numpy 2.1
1 parent 22bd964 commit 5e0f91a

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

xarray/core/duck_array_ops.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,6 @@ def astype(data, dtype, *, xp=None, **kwargs):
246246
if xp is None:
247247
xp = get_array_namespace(data)
248248

249-
if xp == np:
250-
# numpy currently doesn't have a astype:
251-
return data.astype(dtype, **kwargs)
252249
return xp.astype(data, dtype, **kwargs)
253250

254251

0 commit comments

Comments
 (0)