File tree Expand file tree Collapse file tree 3 files changed +34
-4
lines changed
Expand file tree Collapse file tree 3 files changed +34
-4
lines changed Original file line number Diff line number Diff line change 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 :
Original file line number Diff line number Diff line change @@ -44,7 +44,37 @@ Typing for array API and array-api-compat
4444
4545Install 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
File renamed without changes.
You can’t perform that action at this time.
0 commit comments