Skip to content

Commit 6c9856c

Browse files
committed
Add blosc2.asarray check for objects following Array protocol
1 parent e99ffa1 commit 6c9856c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/ndarray/test_lazyexpr.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,6 +1579,7 @@ def __len__(self):
15791579

15801580
a = np.arange(100, dtype=np.int64).reshape(10, 10)
15811581
b = NewObj(a)
1582-
lb = blosc2.lazyexpr("b + 1")
1582+
c = blosc2.asarray(a)
1583+
lb = blosc2.lazyexpr("b + c + 1")
15831584

1584-
np.testing.assert_array_equal(lb[:], a + 1)
1585+
np.testing.assert_array_equal(lb[:], a + a + 1)

0 commit comments

Comments
 (0)