Skip to content

Commit f0303c6

Browse files
committed
chore: wip
1 parent 35f554e commit f0303c6

File tree

3 files changed

+34
-4
lines changed

3 files changed

+34
-4
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ jobs:
3636
fail-fast: false
3737
matrix:
3838
python-version:
39-
- "3.9"
40-
- "3.10"
41-
- "3.11"
39+
# - "3.9"
40+
# - "3.10"
41+
# - "3.11"
4242
- "3.12"
4343
- "3.13"
4444
os:

README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,37 @@ Typing for array API and array-api-compat
4444

4545
Install this via pip (or your favourite package manager):
4646

47-
`pip install array-api`
47+
```shell
48+
pip install array-api
49+
```
50+
51+
## Usage
52+
53+
### Type stubs
54+
55+
Provices type stubs for [`array-api-compat`](https://data-apis.org/array-api-compat/).
56+
57+
```python
58+
import array_api_compat
59+
60+
xp = array_api_compat.array_namespace(x)
61+
```
62+
63+
### Types
64+
65+
You can test if an object matches the Protocol by:
66+
67+
```python
68+
import array_api_strict
69+
70+
from array_api._2024_12 import ArrayNamespace, ArrayNamespaceFull
71+
72+
73+
assert isinstance(array_api_strict, ArrayNamespace)
74+
# Full version contains fft and linalg
75+
# fft and linalg are not included by default in array_api_strict
76+
assert not isinstance(array_api_strict, ArrayNamespaceFull)
77+
```
4878

4979
## Contributors ✨
5080

0 commit comments

Comments
 (0)