Skip to content

Commit 75420e9

Browse files
committed
Add some text to the README
1 parent e272020 commit 75420e9

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,32 @@
1-
# numpy-array-api-compat
2-
Compatibility layer for NumPy to support the Array API
1+
# NumPy Array API compatibility library
2+
3+
This is a small wrapper around NumPy that is compatible with the [Array API
4+
standard](https://data-apis.org/array-api/latest/). See also [NEP 47](https://numpy.org/neps/nep-0047-array-api-standard.html).
5+
6+
Unlike `numpy.array_api`, this is not a strict minimal implementation of the
7+
Array API, but rather just an extension of the main NumPy namespace with
8+
changes needed to be compliant with the Array API. See
9+
https://numpy.org/doc/stable/reference/array_api.html for a full list of
10+
changes. In particular, unlike `numpy.array_api`, this package does not use a
11+
separate Array object, but rather just uses `numpy.ndarray` directly.
12+
13+
Note that some of the functionality in this library is backwards incompatible
14+
with NumPy.
15+
16+
Library authors using the Array API may wish to test against `numpy.array_api`
17+
to ensure they are not using functionality outside of the standard, but prefer
18+
this implementation for end users who use NumPy arrays.
19+
20+
## Usage
21+
22+
To use this library replace
23+
24+
```py
25+
import numpy as np
26+
```
27+
28+
with
29+
30+
```py
31+
import numpy_array_api_compat as np
32+
```

0 commit comments

Comments
 (0)