NumPy 2.xx.x Release Notes#
Highlights#
We’ll choose highlights for this release near the end of the release cycle.
Expired deprecations#
numpy.distutilshas been removed(gh-30340)
Passing
Noneas dtype tonp.finfowill now raise aTypeError(deprecated since 1.25)(gh-30460)
numpy.crossno longer supports 2-dimensional vectors (deprecated since 2.0)(gh-30461)
numpy._core.numerictypes.maximum_sctypehas been removed (deprecated since 2.0)(gh-30462)
numpy.row_stackhas been removed in favor ofnumpy.vstack(deprecated since 2.0).get_array_wraphas been removed (deprecated since 2.0).(gh-30463)
recfromtxtandrecfromcsvhave been removed fromnumpy.lib._npyioin favor ofnumpy.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)