File tree Expand file tree Collapse file tree 3 files changed +190
-1
lines changed Expand file tree Collapse file tree 3 files changed +190
-1
lines changed Original file line number Diff line number Diff line change 1+ <h1 align =' center ' > array-api-typing </h1 >
2+ <h3 align =" center " >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 xpt
44+ >>> import numpy as np
45+
46+ >>> def func (x : xpt.HasNamespace) -> xpt.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 4545 " lefthook>=1.11.13" ,
4646]
4747 test = [
48+ " numpy>=1.24" ,
4849 " pytest>=8.3.3" ,
4950 " pytest-cov>=3" ,
5051 " pytest-github-actions-annotate-failures>=0.3.0" ,
5152 " sybil>=8.0.0" ,
52- ]
53+ ]
5354
5455
5556[tool .hatch ]
You can’t perform that action at this time.
0 commit comments