Skip to content

Commit 5513c8c

Browse files
committed
WIP at
1 parent 3e7fa76 commit 5513c8c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/array_api_extra/_lib/_compat.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,23 @@
66
from ..._array_api_compat_vendor import ( # pyright: ignore[reportMissingImports]
77
array_namespace, # pyright: ignore[reportUnknownVariableType]
88
device, # pyright: ignore[reportUnknownVariableType]
9+
is_dask_array, # pyright: ignore[reportUnknownVariableType]
10+
is_jax_array, # pyright: ignore[reportUnknownVariableType]
11+
is_writeable_array, # pyright: ignore[reportUnknownVariableType]
912
)
1013
except ImportError:
1114
from array_api_compat import ( # pyright: ignore[reportMissingTypeStubs]
1215
array_namespace, # pyright: ignore[reportUnknownVariableType]
1316
device,
17+
is_dask_array, # pyright: ignore[reportUnknownVariableType]
18+
is_jax_array, # pyright: ignore[reportUnknownVariableType]
19+
is_writeable_array, # pyright: ignore[reportUnknownVariableType,reportAttributeAccessIssue]
1420
)
1521

1622
__all__ = [
1723
"array_namespace",
1824
"device",
25+
"is_dask_array",
26+
"is_jax_array",
27+
"is_writeable_array",
1928
]

src/array_api_extra/_lib/_compat.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ def array_namespace(
1111
use_compat: bool | None = None,
1212
) -> ArrayModule: ...
1313
def device(x: Array, /) -> Device: ...
14+
def is_dask_array(x: object, /) -> bool: ...
15+
def is_jax_array(x: object, /) -> bool: ...
16+
def is_writeable_array(x: object, /) -> bool: ...

0 commit comments

Comments
 (0)