Overview

NumPy 1.26, released on September 17, 2023, is the last 1.x release. It prepares the transition to NumPy 2.0 and adds Python 3.12 support.

Main Features

Last 1.x release

NumPy 1.26 emits deprecation warnings for APIs that will be removed in NumPy 2.0.

python
import numpy as np
import warnings

# Enable deprecation warnings
warnings.filterwarnings('error', category=DeprecationWarning)

arr = np.array([1, 2, 3])
print(arr.dtype)  # int64
print(np.__version__)  # 1.26.x

Python 3.12 support

NumPy 1.26 is the first version to support Python 3.12, with precompiled wheels available on PyPI.

python
import sys
import numpy as np

print(f'Python {sys.version}')
print(f'NumPy {np.__version__}')

# Works on Python 3.9 to 3.12
arr = np.arange(10)
print(arr.mean())  # 4.5

Sources