Overview
NumPy 2.4, released on December 20, 2025, adds runtime introspection, same_value casting and hash unique.
Main Features
Runtime introspection
The new introspection API lets you query runtime capabilities (SIMD, threading) programmatically.
python
import numpy as np
# Capability introspection
info = np.__config__.show(mode='dicts')
print(info['Build Dependencies']['blas']['name'])
# same_value casting
arr = np.array([1.0, 2.0, 3.0])
result = arr.astype(np.int64, casting='same_value')
print(result) # [1, 2, 3]
same_value casting and hash unique
The same_value casting mode verifies that conversions do not lose values. np.unique now uses hashing for better performance on large arrays.
