File tree Expand file tree Collapse file tree 3 files changed +184
-125
lines changed Expand file tree Collapse file tree 3 files changed +184
-125
lines changed Original file line number Diff line number Diff line change 1+ <h1 align =' center ' > array-api-typing </h1 >
2+ <h3 align =" center " >Runtime-Checkable Type Annotations for the Array APi</h3 >
3+
4+ ---
5+
6+ ## Installation
7+
8+ ``` bash
9+ pip install array-api-typing
10+ ```
11+
12+ <details >
13+ <summary >using <code >uv</code ></summary >
14+
15+ ``` bash
16+ uv add array-api-typing
17+ ```
18+
19+ </details >
20+ <details >
21+ <summary >from source, using pip</summary >
22+
23+ ``` bash
24+ pip install git+https://https://github.com/data-apis/array-api-typing.git
25+ ```
26+
27+ </details >
28+ <details >
29+ <summary >building from source</summary >
30+
31+ ``` bash
32+ cd /path/to/parent
33+ git clone https://https://github.com/data-apis/array-api-typing.git
34+ cd array-api-typing
35+ pip install -e . # editable mode
36+ ```
37+
38+ </details >
39+
40+ ### Quick example
41+
42+ ``` pycon
43+ >>> import array_api_typing as arrt
44+ >>> import numpy as np
45+
46+ >>> def func (x : arrt.HasNamespace) -> arrt.HasNamespace:
47+ ... return x
48+
49+ >>> func(np.array([1 , 2 , 3 ]))
50+ array([1, 2, 3])
51+
52+ ```
Original file line number Diff line number Diff line change 4343 " lefthook>=1.11.13" ,
4444]
4545 test = [
46+ " numpy>=2.2.6" ,
4647 " pytest>=8.3.3" ,
4748 " pytest-cov>=3" ,
4849 " pytest-github-actions-annotate-failures>=0.3.0" ,
4950 " sybil>=8.0.0" ,
50- ]
51+ ]
5152
5253
5354[tool .hatch ]
You can’t perform that action at this time.
0 commit comments