Overview

NumPy 2.1, released on August 19, 2024, implements the Array API 2023 specification and continues modernizing the library.

Main Features

Array API 2023

NumPy implements the Array API 2023 specification, enabling interoperability with CuPy, JAX, and other conforming libraries.

python
import numpy as np

# Using the Array API namespace
xp = np  # Array API 2023 compatible

x = xp.asarray([1.0, 2.0, 3.0])
y = xp.asarray([4.0, 5.0, 6.0])

# Standard-conforming functions
dot = xp.vecdot(x, y)
print(f'Dot product: {dot}')  # 32.0

Sources