https://github.com/data-apis/array-api
RFC document, tooling and other content related to the array API standard
https://github.com/data-apis/array-api
pydata spec standard
Last synced: about 1 month ago
JSON representation
RFC document, tooling and other content related to the array API standard
- Host: GitHub
- URL: https://github.com/data-apis/array-api
- Owner: data-apis
- License: mit
- Created: 2020-05-10T15:44:24.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2026-03-15T16:31:22.000Z (about 2 months ago)
- Last Synced: 2026-03-16T05:02:42.545Z (about 2 months ago)
- Topics: pydata, spec, standard
- Language: Python
- Homepage: https://data-apis.github.io/array-api/latest/
- Size: 14.4 MB
- Stars: 264
- Watchers: 30
- Forks: 54
- Open Issues: 88
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Array API standard
[](#contributors-)
This repository contains documents, tooling and other content related to the
API standard for arrays (or tensors).
These are relevant documents related to the content in this repository:
- [Rendered HTML docs for latest version](https://data-apis.github.io/array-api/latest)
- [Consortium announcement blog post](https://data-apis.org/blog/announcing_the_consortium/)
- [Blog post on first release of draft array API standard](https://data-apis.org/blog/array_api_standard_release/)
See [CONTRIBUTING.md](CONTRIBUTING.md) for how to go about contributing to
this array API standard.
## Workgroup Meetings
To coordinate activities and facilitate discussion across the Python ecosystem, the Consortium for Python Data API Standards holds an open meeting every other week on Thursdays throughout the year.
This meeting is open to the public. So if you have questions about the array API standard, pain points, feature requests, or are just wanting to listen in, we encourage you to join the public call to connect with Consortium members, stay updated on the latest Consortium activities, and chat with others in the community.
Everyone is welcomeβdrop in and say hello!
### Time
**UTC 17:00 (05:00 PM)** every other Thursday:
| Timezone | Date/Time |
| ---------- | ---------- |
| US / Pacific | Thu 10:00 (10:00 AM) |
| US / Mountain | Thu 11:00 (11:00 AM) |
| US / Central | Thu 12:00 (12:00 AM) |
| US / Eastern | Thu 13:00 (01:00 PM) |
| EU / Western | Thu 18:00 (06:00 PM) |
| EU / Central | Thu 19:00 (07:00 PM) |
| EU / Eastern | Thu 20:00 (08:00 PM) |
| Moscow | Thu 20:00 (08:00 PM) |
| Chennai | Thu 22:30 (10:30 PM) |
| Hangzhou | Fri 01:00 (01:00 AM) |
| Tokyo | Fri 02:00 (02:00 AM) |
| Sydney | Fri 03:00 (03:00 AM) |
### Links
- Public calendar:
### Joining the meeting
- See the public calendar for information on how to join!
### Agenda
- Have specific things to discuss? Feel free to comment on or the linked agenda document!
* * *
## Development
### Building docs locally
#### Quickstart
To install the local stubs and additional dependencies of the Sphinx docs, you
can use `pip install -r doc-requirements.txt`. Then just running `make` at the
root of the repository should build the whole spec website.
```sh
$ pip install -r doc-requirements.txt
$ make
$ ls _site/
2021.12/ draft/ index.html latest/ versions.json
```
#### The nitty-gritty
The spec website is comprised of multiple Sphinx docs (one for each spec version),
all of which exist in `spec/` and rely on the modules found in `src/` (most
notably `array_api_stubs`). For purposes of building the docs, these `src/`
modules do not need to be installed as they are added to the `sys.path` at
runtime.
To build specific versions of the spec, run `sphinx-build` on the respective
folder in `spec/`, e.g.
```sh
$ sphinx-build spec/2012.12/ _site/2012.12/
```
Additionally, `make draft` aliases
```sh
$ sphinx-build spec/draft/ _site/draft/
```
To build the whole website, which includes every version of the spec, you can
utilize `make spec`.
### Making a spec release
The Sphinx doc at `spec/draft/` should be where the in-development spec resides,
with `src/array_api_stubs/_draft/` containing its respective stubs. A spec
release should involve:
* Renaming `src/array_api_stubs/_draft/` to `src/array_api_stubs/_YYYY_MM`
* Renaming `spec/draft/` to `spec/YYYY.MM`
* Updating `spec/YYYY.MM/conf.py`
```diff
...
- from array_api_stubs import _draft as stubs_mod
+ from array_api_stubs import _YYYY_MM as stubs_mod
...
- release = "DRAFT"
+ release = "YYYY.MM"
...
```
* Updating `spec/_ghpages/versions.json`
```diff
{
+ "YYYY.MM": "YYYY.MM",
...
```
* Updating `Makefile`
```diff
...
-sphinx-build "$(SOURCEDIR)/PREVIOUS.VER" "$(BUILDDIR)/PREVIOUS.VER" $(SPHINXOPTS)
+ -sphinx-build "$(SOURCEDIR)/YYYY.MM" "$(BUILDDIR)/YYYY.MM" $(SPHINXOPTS)
- -cp -r "$(BUILDDIR)/PREVIOUS.VER" "$(BUILDDIR)/latest"
+ -cp -r "$(BUILDDIR)/YYYY.MM" "$(BUILDDIR)/latest"
...
```
These changes should be committed and tagged. The next draft should then be
created. To preserve git history for both the new release and the next draft:
1. Create and checkout to a new temporary branch.
```sh
$ git checkout -b tmp
```
2. Make an empty commit. This is required so merging the temporary branch
(4.) is not automatic.
```sh
$ git commit --allow-empty -m "Empty commit for draft at YYYY.MM "
```
3. Checkout back to the branch you are making a spec release in.
```sh
$ git checkout YYYY.MM-release
```
4. Merge the temporary branch, specifying no commit and no fast-forwarding.
```sh
$ git merge --no-commit --no-ff tmp
Automatic merge went well; stopped before committing as requested
```
5. Checkout the `spec/draft/` files from the temporary branch.
```sh
$ git checkout tmp -- spec/draft/
```
6. Commit your changes.
```sh
$ git commit -m "Copy YYYY.MM as draft with preserved git history"
```
You can run `git blame` on both `spec/YYYY.MM` and `spec/draft` files to verify
we've preserved history. See this [StackOverflow question](https://stackoverflow.com/q/74365771/5193926)
for more background on the approach we use.
* * *
## Contributors β¨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

Saul Shanabrook
π§ π€ π¬

Athan
π π£ π§ π¬

Stephannie Jimenez Gacha
π£ π π¬

Aaron Meurer
π β οΈ π§

Tony Fast
π§

Ralf Gommers
π πΌ π» π π π π§ π€ π π’

Travis E. Oliphant
πΌ π π€

Leo Fang
π π€ π

Tianqi Chen
π€ π

Stephan Hoyer
π€ π π¬

Alexandre Passos
π€ π

Paige Bailey
π

Adam Paszke
π€ π π’

Andreas Mueller
π€ π

Sheng Zha
π€

kkraus
π€ π π’

Tom Augspurger
π π¬

edloper
π π¬

Areg Melik-Adamyan
π π

Oleksandr Pavlyk
π π¬

tdimitri
π€

Jack Pappas
π€

Ashish Agarwal
π π¬

Edward Z. Yang
π€

Mike Ruberry
π€

Eric Wieser
π€

Carol Willing
π€

Alex Rogozhnikov
π€

Matthew Honnibal
π€

Mario Lezcano Casado
π€

Bas van Beek
π€

Sebastian Berg
π€

Isaac Breen
π€

Kenichi Maehashi
π€

Chris Pryer
π€

Tirth Patel
π€

Kshiteej K
π€

Anirudh Dagar
π€

Tom White
π€

Matthew Barber
π€ π

Philip Meier
π¬ π»

Zac Hatfield-Dodds
π€ π»

Daniel Lenton
π»

Simone G
π» π€

Tyler Reddy
π€

Matt Barrett
π€

Jatin Prakash
π€

Ishtiaq Hussain
π€

sherry30
π€

JoΓ£o Lobo
π€

Neil Girdhar
π€

Nathaniel Starkman
π€

jakirkham
π€

RickSanchezStoic
π€

Talley Lambert
π€

Juan Nunez-Iglesias
π€

Christian Kothe
π€

Carlos Ramos CarreΓ±o
π€

Gilad
π€

Thomas J. Fan
π€

Conchylicultor
π€

Franck Charras
π€

Keith Kraus
π€

Lucas Colley
π§ π
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!