# What changed in numpy

> 229 changes in numpy 2 from its official release notes, upgrade guides and advisories: 76 breaking, 19 deprecations, 7 security, 26 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/pypi/numpy/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## numpy 2

### Breaking changes

- When a copied fill_value cannot be represented in the new dtype, it resets to that dtype’s default; explicitly supplied fill_value values are still validated and raise as before. (2.5.4) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.4)
- Raises for inputs containing infinities instead of returning garbage results, and fixes hangs for certain such inputs with recent LAPACK implementations. (2.5.4) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.4)
- Raises for inputs containing infinities instead of returning garbage results, and fixes hangs for certain such inputs with recent LAPACK implementations. (2.5.4) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.4)
- Casting a fixed-width byte string array with invalid UTF-8 to StringDType now raises TypeError instead of storing invalid bytes. (2.5.3) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.3)
- The struct is opaque for extensions targeting the free-threading-compatible stable ABI, so those extensions can no longer access its fields; the NpyString allocator API remains usable with the descriptor pointer. (2.5.2) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.2)
- The minimum supported GCC version increased from 9.3.0 to 10.3.0, affecting developers building NumPy from source. (2.5.1) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.1)
- The data type alias 'a' has been removed; use 'S' instead. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- _add_newdoc_ufunc(ufunc, newdoc) has been removed; assign ufunc.__doc__ instead. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Scalars now export the interface directly and are read-only, rather than exposing an array copy through a __ref entry. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Projects building against NumPy's Cython headers now require Cython 3.0 or newer. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- get_array_wrap has been removed. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Windows platforms now require a minimum MSVC 19.35 toolchain, corresponding to Visual Studio 2022 version 17.5 Preview 2 or newer. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- For object arrays, imag now returns getattr(element, "imag", 0) elementwise, and the result is read-only. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- For object arrays, real now returns getattr(element, "real", element) elementwise, and the result is read-only. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- This function has been removed. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Non-integer inputs now raise TypeError. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- The re-export of numpy.char.chararray has been removed. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Two-dimensional vectors are no longer supported. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- The function now accepts only numpy.ndarray; passing a scalar type raises TypeError. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Addition, subtraction, and integer multiplication now raise OverflowError when results overflow int64 or land on the NaT sentinel. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- numpy.distutils has been removed. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Passing None as dtype now raises TypeError. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Unsupported device, dtype, or excessive dimensionality now raises BufferError instead of RuntimeError. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- numpy.isreal is affected by the changed object-array imag behavior because it uses arr.imag. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- The alias for the standard library math module has been removed. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- numpy.linalg.eig now always returns complex arrays, rather than returning values whose type depended on the eigenvalues. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- numpy.linalg.eigvals now always returns complex arrays, rather than returning values whose type depended on the eigenvalues. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- meshgrid now always returns a tuple, including when sparse is true and copy is false. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Errors in the BTPE sampler's Stirling-series acceptance/rejection step were corrected, so results may differ for the same seed. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Results may differ for the same seed because the BTPE sampler used internally by multinomial had errors corrected. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- numpy.row_stack has been removed in favor of numpy.vstack. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Addition, subtraction, and integer multiplication now raise OverflowError when results overflow int64 or land on the NaT sentinel. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Out-of-range Python integers in x or y are no longer silently truncated; they now raise OverflowError. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- The C API function now raises OverflowError rather than silently truncating out-of-range Python integers. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- NumPy 2.5.0 drops support for Python 3.11; supported Python versions are 3.12–3.14. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- recfromtxt and recfromcsv have been removed from numpy.lib._npyio in favor of numpy.genfromtxt. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- recfromtxt and recfromcsv have been removed from numpy.lib._npyio in favor of numpy.genfromtxt. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Copies of structured arrays with identical contiguous dtypes now use memcpy, which may copy padding bytes that were previously left untouched. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Returns rank 0 for empty matrices. (2.4.5) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.5)
- Converting an array with ndim greater than zero to a scalar now raises TypeError; extract a single element first. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The default x86 baseline has been raised to x86-64-v2; builds can set it to none to support older CPUs. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The deprecated, nonfunctional disp function has been removed. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Index preparation now matches ndarray behavior, with stricter validation, corrected IndexError types, and more specific errors; some float and scalar-boolean indices are deprecated. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Sorting with kind='heapsort' now maps to kind='quicksort', potentially changing execution time or unstable argsort order. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The deprecated runtime discovery mechanism has been removed. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The undocumented get_as_parameter method was removed; use _as_parameter_ instead. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The undocumented get_data method was removed; use data instead. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The undocumented get_shape method was removed; use shape instead. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The undocumented get_strides method was removed; use strides instead. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The macro defined in npy_cpu.h has been removed. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- When used, NPY_HEAPSORT is mapped to NPY_QUICKSORT. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Deleting numpy from sys.modules and importing it again now fails with ImportError because C extension modules are checked for single import per process. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Type checkers no longer accept start as a keyword argument, though runtime use remains possible. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The style parameter has been removed; arguments following it, such as formatter, are now keyword-only. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The bias argument has been removed because it had no effect. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The ddof argument has been removed because it had no effect. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The deprecated module has been removed; use numpy.fft instead. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Removed in favor of numpy.isin. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The deprecated module has been removed; use numpy.linalg instead. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The delimitor parameter has been removed; use delimiter instead. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The interpolation parameter has been removed; use method instead. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The interpolation parameter has been removed; use method instead. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Removed; use next(ndindex) instead. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The interpolation parameter has been removed; use method instead. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The interpolation parameter has been removed; use method instead. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The newshape parameter has been removed; pass the shape positionally or use shape= on newer NumPy versions. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Always returns a copy, including for integer inputs with nonnegative decimals. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The ignored fix_imports parameter has been removed. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Passing a generator directly now raises TypeError; use numpy.fromiter or Python's sum builtin. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Removed; use numpy.trapezoid or scipy.integrate functions instead. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The type alias no longer accepts None; use DTypeLike | None for optional dtype annotations. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Hash-based unique extraction speeds up string arrays substantially, but returned unique values are not guaranteed to be sorted. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Multiplication that would create an unrepresentably large string now raises OverflowError instead of MemoryError. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- New x86 CPU feature group representing x86-64-v3 microarchitectures. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- New x86 CPU feature group representing x86-64-v4 microarchitectures. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Negative input now raises ValueError. (2.3.4) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.3.4)

### Security

- Setting an array's dtype attribute is deprecated because mutating a shared array is unsafe; use array.view(dtype=new_dtype). (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Resizing an array in place is deprecated because mutating a shared array is unsafe; use np.resize instead. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Fixes a heap buffer overflow in timedelta-to-string casts. (2.4.5) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.5)
- Fixes a heap overflow in fixed-width string multiplication. (2.4.1) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.1)
- Setting the strides attribute is deprecated because mutating a shared array is unsafe; create a new view instead. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Setting an array's shape attribute is deprecated; use np.reshape or np.ndarray.reshape to create a new view. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0), [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Avoids a segmentation fault in string_expandtabs_length_promoter. (2.3.4) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.3.4)

### Deprecations

- The numpy.char.array and numpy.char.asarray functions are deprecated; use numpy.array or numpy.asarray with a string or bytes dtype. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- This class is deprecated; use an ndarray with a string or bytes dtype instead. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- numpy.ma.round_ is deprecated; use numpy.ma.round instead. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- The same-kind cast check now tests whether the result can be cast to out; a DeprecationWarning is issued when it cannot. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Using the generic unit is deprecated, as are operations that implicitly rely on it; specify an explicit unit instead. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Non-integer values for M, k, and N are deprecated. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Non-integer values for k are deprecated. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Inputs other than integers are deprecated. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Non-integer values for k are deprecated. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Inputs other than integers are deprecated. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- numpy.typename is deprecated because its returned names were outdated and inconsistent; use numpy.dtype.name instead. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- A VisibleDeprecationWarning is emitted when align is not a boolean; pass align as a keyword argument. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- numpy.fix is deprecated; use numpy.trunc, which provides identical functionality and follows the Array API standard. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0), [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The container class is deprecated and will be removed in a future version. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Passing out positionally is deprecated; pass it by keyword to distinguish the output buffer from inputs. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Passing out positionally is deprecated; pass it by keyword to distinguish the output buffer from inputs. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Deprecated in favor of warnings.catch_warnings, warnings.filterwarnings, pytest.warns, or pytest.filterwarnings. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Deprecated in favor of warnings.catch_warnings, warnings.filterwarnings, pytest.warns, or pytest.filterwarnings. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Calling a ufunc with where but without out now emits a warning; out=None suppresses it. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)

### New APIs and options

- A new polynomial function evaluates polynomials in arbitrary dimensions. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- A new polynomial function evaluates polynomials in arbitrary dimensions. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- A new polynomial function evaluates polynomials in arbitrary dimensions. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- A new polynomial function evaluates polynomials in arbitrary dimensions. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- A new polynomial function evaluates polynomials in arbitrary dimensions. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- The descending keyword enables descending argsorts; NaNs remain at the end, and the feature supports built-in dtypes except void, object, and generic. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- User-dtype authors can register dtypes for DLPack export and import. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- The descending keyword enables descending sorts; NaNs remain at the end, and the feature supports built-in dtypes except void, object, and generic. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- A new polynomial function evaluates polynomials in arbitrary dimensions. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- A new C API accessor macro allows accessing a PyArray_Descr field without direct field access. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- A new C API accessor macro allows accessing a PyArray_Descr field without direct field access. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- A new C API accessor macro allows accessing a PyArray_Descr field without direct field access. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- A new C API accessor macro allows accessing a PyArray_Descr field without direct field access. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- User-defined dtypes can implement custom sorting and argsorting with ArrayMethod specs registered through PyUFunc_AddLoopsFromSpecs. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The same_value casting option verifies that values round-trip without changing; it raises ValueError if casting changes any value. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- New DType API slot lets dtype implementations provide constants such as machine limits and special values, enabling numpy.finfo support. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- New NPY_SORTKIND enum name for default sorting, with the same value as NPY_QUICKSORT. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- New NPY_SORTKIND enum name for descending sort; it is not yet implemented. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- New NPY_SORTKIND enum name indicating that sorting must be stable. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- NumPy checks this protocol when converting objects to dtypes through np.dtype or dtype arguments, allowing dtype-like objects to define conversion explicitly. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The ndmax option limits the maximum dimensions created from nested sequences, useful for preserving nested structures as object elements. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The pad_width argument now accepts a dictionary. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Accepts multiple axes. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The axis argument now accepts a sequence to trim zeros along multiple axes. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- New C API function registers multiple ufunc loops from specs in one call, including sorting and argsorting loops using ArrayMethod. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- New x86 CPU feature group representing x86-64-v2 microarchitectures. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)

### Performance

- Reductions over all axes now use a fast path for contiguous, aligned, non-object arrays with no special arguments. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Reductions over all axes now use a fast path for contiguous, aligned, non-object arrays with no special arguments. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Reductions over all axes now use a fast path for contiguous, aligned, non-object arrays with no special arguments. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Searching for multiple keys is substantially faster through batched binary search steps; single-key performance remains comparable. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Reductions over all axes now use a fast path for contiguous, aligned, non-object arrays with no special arguments. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Ufuncs scale significantly better on free-threading CPython builds through lock-free dispatch, immortal shared objects, and optimized memory allocation. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Iteration over large iteration spaces is significantly faster while preserving the original behavior and interface. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Single-input ufunc calculations on scalars are about six times faster; array performance is unchanged. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)

### Behavior and default changes

- NumPy now uses PyMem_RawMalloc and PyMem_RawFree instead of the system malloc and free; internal allocations can be tracked by tracemalloc. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- When dtype or order correction is needed, f2py now keeps a separate corrected array and copies it back after the Fortran call; only equivalent dtype kinds are allowed. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- FFT functions now support non-float64 and non-complex128 dtypes and gain preliminary shape-typing support. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Input and output dtypes are more precise, and several functions gain preliminary, backward-compatible shape-typing support. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- ndarray and its subclasses now support structural pattern matching with match/case statements. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- The function now returns the full dtype descriptor, including parameters, for scalars of user-defined parametric data types. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- This C API can now register real and imag ArrayMethods for use by imag and real. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Subclasses with dtype-specific logic should set _set_dtype to None to have arr.view(dtype=new_dtype) call __array_finalize__ with the new dtype, or define a function calling ndarray._set_dtype(). (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- NumPy now supports the stable ABI for free-threaded Python. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Typing now accepts NumPy scalars and arrays as the second argument. (2.4.5) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.5)
- Accepts datetime strings. (2.4.2) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.2)
- The default parameter can accept array-like values. (2.4.1) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.1)
- The array interface accepts NULL data pointers and performs a dummy allocation; omit the data field to use the previous scalar path. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Assertion failure messages now include the indices at which the comparison fails. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- The repr of NaT values now includes the datetime64 time unit. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Masked arrays accept and preserve Python strings as fill_value with variable-width StringDType, including through slicing and views; the default is N/A. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Hash-based unique extraction now supports complex dtypes and can return unsorted results. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)

### Tooling

- The module now has typing annotations across masked arrays, masks, functions, and methods. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Many functions and methods now have shape-aware return annotations, allowing type-checkers to infer result array dimensions for common operations. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- On win-arm64, the library file extension is now .lib instead of .a for MSVC and setuptools compatibility. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- On win-arm64, the library file extension is now .lib instead of .a for MSVC and setuptools compatibility. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- On win-arm64, the npymath and npyrandom static libraries now use the .lib extension instead of .a for compatibility with MSVC and setuptools. (2.3.4) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.3.4)

### Fixes and other changes

- Includes a workaround for an MSVC 19.51 bug. (2.5.4) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.4)
- Fixes truncation of the old and new strings to the length of the input array’s string. (2.5.4) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.4)
- Handles non-finite inputs more consistently. (2.5.4) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.4)
- Instances with equivalent floating-point NaN sentinels now have equal hashes, so dictionary lookups and set deduplication no longer fail because equal dtypes had different hashes. (2.5.4) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.4)
- Includes many typing fixes and improvements. (2.5.4) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.4)
- Fixes two possible crashes in the accumulate implementation. (2.5.4) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.4)
- When a dtype-changing ufunc leaves the copied fill_value invalid for the new dtype, NumPy now uses that dtype’s default fill_value instead of propagating a stale value. (2.5.3) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.3)
- Fixes the stride after removing a multi-index. (2.5.2) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.2)
- Fixes cast errors being swallowed during assignment. (2.5.2) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.2)
- Restores conjugate behavior for legacy user-defined dtypes. (2.5.2) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.2)
- Fixes a reference-count leak for overlapping copies when where is False. (2.5.2) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.2)
- Fixes corruption when reusing a StringDType. (2.5.2) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.2)
- Adds a special case for StringDType. (2.5.2) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.2)
- The release supports Python 3.15 and includes wheels for Python 3.15.0rc1. (2.5.2) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.2)
- Ensures the lock is held when accessing or writing RNG state and fully resets cached state for non-MT19937 RNGs. (2.5.2) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.2)
- Fixes the coerce flag in binary ufunc promotion. (2.5.2) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.2)
- Fixed an output-array leak in accumulate when dtype … (2.5.1) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.1)
- Corrected dtype inference for asarray([]). (2.5.1) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.1)
- The datetime Cython APIs were fixed to be compatible with older NumPy versions, helping downstream projects support those versions. (2.5.1) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.1)
- finfo is more accessible for user-defined dtypes. (2.5.1) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.1)
- Corrected the return type for object_ values. (2.5.1) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.1)
- Fixed a segfault by preventing recursive seed lists. (2.5.1) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.1)
- Fixed a typing regression introduced in NumPy 2.5.0. (2.5.1) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.1)
- Deadlocks when using the NpyString API were fixed. (2.5.1) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.1)
- Fixed an output-array leak in reduceat when dtype … (2.5.1) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.1)
- Fixed a leak in reductions when a ufunc override errors or is … (2.5.1) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.1)
- Fixed several bugs in StringDType operations. (2.5.1) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.1)
- Allocatable module variables wrapped by f2py now appear in dir() output. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- numpy.triu_indices now accepts unsigned integers in all cases. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- StringDType comparisons now correctly handle embedded NULL bytes. (2.5.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.5.0)
- Fixes a regression in arr.conj(). (2.4.6) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.6)
- Fixes non-unitary results from np.linalg.svd(..., hermitian=True). (2.4.6) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.6)
- Fixes support for runtime type checkers. (2.4.5) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.5)
- Maps complex_long_double to NPY_CLONGDOUBLE. (2.4.5) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.5)
- Fixes typing for boolean and non-1D inputs. (2.4.5) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.5)
- Fixes in-place aliasing when out is the input. (2.4.5) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.5)
- Fixes a segfault when __getitem__ raises. (2.4.5) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.5)
- Undo the deprecation of the signature used by old pickles. (2.4.5) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.5)
- Fixes failures with a 0-dimensional out argument. (2.4.5) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.5)
- Fixes the assignability of np.shape for Python lists. (2.4.5) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.5)
- Fixes a memory leak when the fill-zero loop raises. (2.4.5) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.5)
- Prevents a deadlock caused by downstream code importing NumPy during dlopen. (2.4.5) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.5)
- Fixes typing for the axis parameter. (2.4.5) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.5)
- Fixes incorrect temporary elision for new-style user-defined dtypes. (2.4.5) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.5)
- Fixes in-place aliasing when out is the input. (2.4.5) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.5)
- Fixes 64-bit selection by using NPY_SIZEOF_UINTP. (2.4.4) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.4)
- Avoids a warning when a ufunc is called with where=True and no output. (2.4.4) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.4)
- Fixes handling of a bool array weekmask. (2.4.3) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.3)
- Fixes a weak hash function used by np.isin(). (2.4.3) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.3)
- Fixes infinite recursion in np.ma.flatten_structured_array. (2.4.3) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.3)
- Adds missing extended precision imports to matlib's typing support. (2.4.3) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.3)
- Fixes the OpenBLAS threading problem on ARM. (2.4.3) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.4), [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.3)
- Fixes memory leaks discovered after the 2.4.1 release. (2.4.2) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.2)
- Updates OpenBLAS to fix hangs. (2.4.2) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.2)
- Fixes the quantile promotion fixup. (2.4.2) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.2)
- Fixes validation of contraction axes. (2.4.2) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.2)
- Fixes a leak in the flat assignment iterator. (2.4.1) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.1)
- Fixes the return type of histogram2d. (2.4.1) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.1)
- Preserves the SeedlessSequence typo so wheels using the random Cython API and built against NumPy < 2.4.0 run without errors. (2.4.1) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.1)
- Many NumPy functions, classes, and methods now return meaningful signatures instead of raising ValueError, improving introspection and tooling support. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Accuracy is improved for 16- and 32-bit floating-point input data. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Accuracy is improved for 16- and 32-bit floating-point input data. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- This release supports Python versions 3.11–3.14. (2.4.0) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.3), [release notes](https://github.com/numpy/numpy/releases/tag/v2.4.0)
- Fixed resize when the array contains references. (2.3.5) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.3.5)
- Fixed the implementation to avoid negating INT_MIN. (2.3.5) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.3.5)
- Fixed float16-sort failures on 32-bit x86 MSVC. (2.3.4) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.3.4)
- Fixed an assertion failure in buffer setup. (2.3.4) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.3.4)
- A malloc failure now emits MemoryError. (2.3.4) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.3.4)
- Fixed umath strides for AIX compatibility. (2.3.4) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.3.4)
- INT_MIN % -1 now returns 0 for all signed integer types. (2.3.4) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.3.4)
- Fixed negative samples generated by the Wald distribution. (2.3.4) — [release notes](https://github.com/numpy/numpy/releases/tag/v2.3.4)
