NumPy 2.xx.x Release Notes#

Highlights#

We’ll choose highlights for this release near the end of the release cycle.

Expired deprecations#

  • numpy.distutils has been removed

    (gh-30340)

  • Passing None as dtype to np.finfo will now raise a TypeError (deprecated since 1.25)

    (gh-30460)

  • numpy.cross no longer supports 2-dimensional vectors (deprecated since 2.0)

    (gh-30461)

  • numpy._core.numerictypes.maximum_sctype has been removed (deprecated since 2.0)

    (gh-30462)

  • numpy.row_stack has been removed in favor of numpy.vstack (deprecated since 2.0).

  • get_array_wrap has been removed (deprecated since 2.0).

    (gh-30463)

  • recfromtxt and recfromcsv have been removed from numpy.lib._npyio in favor of numpy.genfromtxt (deprecated since 2.0).

    (gh-30467)

New Features#

Pixi package definitions#

Pixi package definitions have been added for different kinds of from-source builds of NumPy. These can be used in downstream Pixi workspaces via the pixi-build feature.

Definitions for both default and AddressSanitizer-instrumented (asan) builds are available in the source code under the pixi-packages/ directory.

linux-64 and osx-arm64 platforms are supported.

(gh-30381)

Typing improvements and changes#

numpy.linalg typing improvements and preliminary shape-typing support#

Input and output dtypes for numpy.linalg functions are now more precise. Several of these functions also gain preliminary shape-typing support while remaining backward compatible. For example, the return type of numpy.linalg.matmul now depends on the shape-type of its inputs, or fall back to the backward-compatible return type if the shape-types are unknown at type-checking time. Because of limitations in Python’s type system and current type-checkers, shape-typing cannot cover every situation and is often only implemented for the most common lower-rank cases.

(gh-30480)