Skip to content

Commit 4641d5d

Browse files
committed
Use array instead of asarray for numpy<2 compat
1 parent 55764a3 commit 4641d5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xarray/coding/variables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def _apply_mask(
125125
dtype: np.typing.DTypeLike | None,
126126
) -> np.ndarray:
127127
"""Mask all matching values in a NumPy arrays."""
128-
data = np.asarray(data, dtype=dtype, copy=True)
128+
data = np.array(data, dtype=dtype, copy=True)
129129
if encoded_fill_values:
130130
condition = False
131131
for fv in encoded_fill_values:

0 commit comments

Comments
 (0)