Skip to content

Commit 26cf1d3

Browse files
committed
Address NumPy deprecation warning
1 parent 92601de commit 26cf1d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xarray/core/variable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def _possibly_convert_objects(values):
238238
and values.dtype.kind == "O"
239239
and Version(pd.__version__) >= Version("3.0.0dev0")
240240
):
241-
result.dtype = values.dtype
241+
result = result.view(values.dtype)
242242
return result
243243

244244

0 commit comments

Comments
 (0)