NumPy 2.0 brings API/ABI breaking changes, new features, and performance improvements

NumPy 2.0 brings API/ABI breaking changes, new features, and performance improvements

NumPy, a fundamental package for scientific computing in Python, has released version 2.0, marking its first major update since 2006. This significant update introduces breaking changes, including an ABI break, modified type promotion rules, and API changes not flagged in prior 1.26.x deprecation warnings.

Key features of this release are the new variable-length string dtype, StringDType, and a numpy.strings namespace equipped with efficient ufuncs for string operations. Additionally, numpy.fft functions now support float32 and longdouble, while the main numpy namespace aligns with the array API standard.

The update also enhances Python and C API functionalities, boosts performance, refines type promotion behavior, and offers improved documentation. On Windows, the default integer type shifts from int32 to int64, aligning with other platforms, and the maximum array dimensions increase from 32 to 64. Additionally, NumPy continues its transition from C to C++, aiming to streamline future maintenance and improvements.

by Paul

MORE ABOUT: #NumPy
NumPy iconNumPy
  7
  • FreeOpen Source
  • ...

NumPy is the fundamental package for scientific computing in Python. It offers a multidimensional array object, various derived objects like masked arrays and matrices, and a range of routines for fast array operations. NumPy is widely used for mathematical and logical operations, Fourier transforms, and linear algebra. Top alternatives include R (programming language), MATLAB, and SageMath.

No comments so far, maybe you want to be first?
Gu