array-api-compat
A wrapper around NumPy and other array libraries to make them compatible with the Array API standard
Decision gist · record as of 2026-08-14
Yes, if you are building a library or application that needs to support multiple array backends. The package is actively maintained, has no external dependencies, and MIT-licensed. Install it if you want to write array code once and let users choose their backend; skip it if you are locked to a single array library.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; the underlying array library (NumPy, CuPy, PyTorch, Dask, JAX, ndonnx, or sparse) must be installed separately.
- Low friction install with no runtime dependencies.
- Actively maintained with a recent release and steady commit activity.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal obligations.
last release 2026-06-07 (68 days) · last repo commit 2026-08-10 · 129 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,341,327 downloads/mo, #3,125 on PyPI
Alternatives
Verify before relying
pip install array-api-compat
# Then import and use with your chosen array library
import array_api_compat- Whether the wrapper introduces measurable performance overhead compared to direct library calls
- Coverage completeness: which Array API operations are fully supported versus partially implemented across all supported libraries
- How to select or switch between supported array backends at runtime
What it is and what it does
array-api-compat is a lightweight wrapper that lets you write array code once and run it against multiple array libraries—NumPy, CuPy, PyTorch, Dask, JAX, ndonnx, and sparse—all through a single standardized interface defined by the Array API standard. It abstracts away library-specific quirks and naming differences so your code doesn't need conditional imports or branching logic for different backends.
The package has no runtime dependencies of its own and is designed to be a thin compatibility layer. You import from it instead of directly from your array library, and it delegates to whichever backend you're using. This is useful when building libraries or applications that need to support multiple array backends without duplicating logic, or when you want to let users choose their preferred array library without rewriting your code.
Use it for
- Build a scientific library that works with NumPy, CuPy, PyTorch, Dask, JAX, ndonnx, and sparse without maintaining separate code paths for each.
- Write code that can run on CPU or GPU by swapping the array backend without changing operations.
- Create a machine learning framework that accepts arrays from any supported library and processes them uniformly.
- Migrate code between array libraries by changing only the import statement, not the operations themselves.
- Develop educational materials or examples that work across multiple array libraries without duplication.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building a library or application that needs to support multiple array backends.
The package is actively maintained, has no external dependencies, and MIT-licensed. Install it if you want to write array code once and let users choose their backend; skip it if you are locked to a single array library.
Install
array-api-compat on PyPI
Before you install
Low friction install with no runtime dependencies. Actively maintained with a recent release and steady commit activity.
Requires Python 3.10 or later; the underlying array library (NumPy, CuPy, PyTorch, Dask, JAX, ndonnx, or sparse) must be installed separately.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal obligations.
Quickstart
pip install array-api-compat
# Then import and use with your chosen array library
import array_api_compat
Verify before relying
- Whether the wrapper introduces measurable performance overhead compared to direct library calls
- Coverage completeness: which Array API operations are fully supported versus partially implemented across all supported libraries
- How to select or switch between supported array backends at runtime
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 68 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,341,327 / month, #3,125 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Operating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed |
Evidence: array_api_compat-1.15.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “array api standard wrapper”
- array-api-compatProvides a unified wrapper around NumPy, CuPy, PyTorch, Dask, JAX,…
- array-api-strictProvides a strict, minimal implementation of the Python array API…
- array-api-extraProvides extra array manipulation functions that work across any…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also array-api-strict · fast-array-utils · array-api-extra · autoray · dataframe-api-compat · cupy-cuda12x · cupy-cuda13x · sparse · jax-jumpy · coola