Skip to content

data-apis/array-api-typing

Repository files navigation

array-api-typing

Type Annotations for the Python array API standard


Installation

pip install array-api-typing
using uv
uv add array-api-typing
from source, using pip
pip install git+https://github.com/data-apis/array-api-typing.git
building from source
cd /path/to/parent
git clone https://github.com/data-apis/array-api-typing.git
cd array-api-typing
pip install -e .  # editable mode

Quick example

>>> import array_api_typing as xpt
>>> import numpy as np

>>> def func(x: xpt.HasArrayNamespace) -> xpt.HasArrayNamespace:
...    return x

>>> func(np.array([1, 2, 3]))
array([1, 2, 3])

About

Static typing support for the array API standard

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Contributors 3

  •  
  •  
  •  

Languages