We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d728bf commit 50f8726Copy full SHA for 50f8726
xarray/core/variable.py
@@ -269,9 +269,8 @@ def as_compatible_data(
269
270
Finally, wrap it up with an adapter if necessary.
271
"""
272
- if fastpath and getattr(data, "ndim", 0) > 0:
273
- # can't use fastpath (yet) for scalars
274
- return cast("T_DuckArray", _maybe_wrap_data(data))
+ if fastpath and getattr(data, "ndim", None) is not None:
+ return cast("T_DuckArray", data)
275
276
from xarray.core.dataarray import DataArray
277
0 commit comments