array API JIT
Documentation: https://array-api-jit.readthedocs.io
Source Code: https://github.com/34j/array-api-jit
JIT decorator supporting multiple array API compatible libraries
Installation
Install this via pip (or your favourite package manager):
pip install array-api-jit
Usage
Simply decorate your function with @jit():
from typing import Any
from array_api_jit import jit
@jit()
def my_function(x: Any) -> Any:
xp = array_namespace(x)
return xp.sin(x) + xp.cos(x)
Advanced Usage
You can specify the decorator, arguments, and keyword arguments for each library.
from array_api_jit import jit
from array_api_compat import array_namespace
from typing import Any
import numba
@jit(
{"numpy": numba.jit()}, # numba.jit is not used by default because it may not succeed
decorator_kwargs={
"jax": {"static_argnames": ["n"]}
}, # jax requires for-loop variable to be "static_argnames"
# fail_on_error: bool = False, # do not raise an error if the decorator fails (Default)
# rerun_on_error: bool = True, # re-run the original function if the wrapped function fails (NOT Default)
)
def sin_n_times(x: Any, n: int) -> Any:
xp = array_namespace(x)
for i in range(n):
x = xp.sin(x)
return x
Metadata
Release files for array-api-jit 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| array_api_jit-1.1.0.tar.gz | 6.3 kB | With provenance | Details for array_api_jit-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| array_api_jit-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for array_api_jit-1.1.0-py3-none-any.whl |
Total release size: 11.8 kB
Release files / array_api_jit-1.1.0.tar.gz
| Download URL | array_api_jit-1.1.0.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b8c8277df0e7055d6be10b339971e1364f19b77ee0d361eef64634ebf70ee35
|
|
BLAKE2b-256 checksum How to use checksums |
2803f863243a061e9cf1c6e6ef40e44b1ecb0d10bcf1ea1da1e53c3139f3ba6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logRelease files / array_api_jit-1.1.0-py3-none-any.whl
| Download URL | array_api_jit-1.1.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f323989b2170e6b2059dcf31a9006d0ab9aaa71b793172bc2902a23f1ce1d05
|
|
BLAKE2b-256 checksum How to use checksums |
630737f26e741f4125fb9ac72d4229a155ec8d81486ae05357857798297377e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logSecurity for array-api-jit 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for array_api_jit-1.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.