Skip to content

Commit 01ec114

Browse files
committed
📝 docs(README): start the README
Signed-off-by: Nathaniel Starkman <nstarman@users.noreply.github.com>
1 parent 9214809 commit 01ec114

File tree

3 files changed

+190
-1
lines changed

3 files changed

+190
-1
lines changed

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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+
```

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,12 @@
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]

0 commit comments

Comments
 (0)