Skip to content

data-apis/array-api-typing

Repository files navigation

array-api-typing

Type Annotations for the Python array API standard


Warning

This package is in early development and is not yet stable. It is intended as a typing toolkit for working with the Python array API standard, but it may change significantly in the future.

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 5

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy