Python Array API Support

The Python array API standard aims to provide a coherent set of APIs for array and tensor libraries developed by the community to build upon. This solves the API fragmentation issue across the community by offering concrete function signatures, semantics and scopes of coverage, enabling writing backend-agnostic codes for better portability.

CuPy provides experimental support based on NumPy’s NEP-47, which is in turn based on the draft standard to be finalized in 2021. All of the functionalities can be accessed through the cupy.array_api namespace.

The key difference between NumPy and CuPy is that we are a GPU-only library, therefore CuPy users should be aware of potential device management issues. Same as in regular CuPy codes, the GPU-to-use can be specified via the Device objects, see Device management.