Skip to content

Commit c9f235b

Browse files
committed
check None, switch include_0d
1 parent 7b429f9 commit c9f235b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xarray/core/variable.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def as_variable(
145145
" ambiguous, please extract the data using the .data property."
146146
)
147147

148-
if utils.is_scalar(data_, include_0d=True):
148+
if utils.is_scalar(data_, include_0d=False) and sizes is not None:
149149
try:
150150
shape_ = tuple(sizes[i] for i in dims_)
151151
except TypeError as err:

0 commit comments

Comments
 (0)