Skip to content

Commit 63dea24

Browse files
committed
Fixing the code to pass CI attempt #1
1 parent d70f74b commit 63dea24

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

xarray/core/duck_array_ops.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,12 @@ def lazy_array_equiv(arr1, arr2):
321321
arr2 = asarray(arr2)
322322
if arr1.shape != arr2.shape:
323323
return False
324-
if arr1.ndim == 0 and arr2.ndim == 0:
324+
if (
325+
arr1.ndim == 0
326+
and arr2.ndim == 0
327+
and isinstance(arr1, np.ndarray)
328+
and isinstance(arr2, np.ndarray)
329+
):
325330
return bool(arr1 == arr2)
326331
if dask_available and is_duck_dask_array(arr1) and is_duck_dask_array(arr2):
327332
from dask.base import tokenize

xarray/tests/test_duck_array_ops.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,8 +1091,6 @@ def test_push_dask(method, arr):
10911091
np.testing.assert_equal(actual, expected)
10921092

10931093

1094-
import numpy as np
1095-
10961094
from xarray.core.duck_array_ops import lazy_array_equiv
10971095

10981096

0 commit comments

Comments
 (0)