Skip to content

Commit 81f3166

Browse files
committed
is_lazy_array
1 parent b7cbdf8 commit 81f3166

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/array_api_extra/_lib/_utils/_compat.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
is_dask_namespace,
1515
is_jax_array,
1616
is_jax_namespace,
17+
is_lazy_array,
1718
is_numpy_array,
1819
is_numpy_namespace,
1920
is_pydata_sparse_array,
@@ -35,6 +36,7 @@
3536
is_dask_namespace,
3637
is_jax_array,
3738
is_jax_namespace,
39+
is_lazy_array,
3840
is_numpy_array,
3941
is_numpy_namespace,
4042
is_pydata_sparse_array,
@@ -56,6 +58,7 @@
5658
"is_dask_namespace",
5759
"is_jax_array",
5860
"is_jax_namespace",
61+
"is_lazy_array",
5962
"is_numpy_array",
6063
"is_numpy_namespace",
6164
"is_pydata_sparse_array",

src/array_api_extra/_lib/_utils/_compat.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,6 @@ def is_jax_array(x: object, /) -> bool: ...
3232
def is_numpy_array(x: object, /) -> bool: ...
3333
def is_pydata_sparse_array(x: object, /) -> bool: ...
3434
def is_torch_array(x: object, /) -> bool: ...
35+
def is_lazy_array(x: object, /) -> bool: ...
3536
def is_writeable_array(x: object, /) -> bool: ...
3637
def size(x: Array, /) -> int | None: ...

vendor_tests/test_vendor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ def test_vendor_compat():
1414
is_dask_namespace,
1515
is_jax_array,
1616
is_jax_namespace,
17+
is_lazy_array,
1718
is_numpy_array,
1819
is_numpy_namespace,
1920
is_pydata_sparse_array,
@@ -35,6 +36,7 @@ def test_vendor_compat():
3536
assert not is_dask_namespace(xp)
3637
assert not is_jax_array(x)
3738
assert not is_jax_namespace(xp)
39+
assert not is_lazy_array(x)
3840
assert not is_numpy_array(x)
3941
assert not is_numpy_namespace(xp)
4042
assert not is_pydata_sparse_array(x)

0 commit comments

Comments
 (0)