Skip to content

Releases

v2.5.5 (Nov 15, 2026)

Choose a tag to compare

@charris charris released this 15 Nov 23:35
Immutable release. Only release title and notes can be modified.
v2.5.5
afcbc6d

NumPy 2.5.5 Release Notes

Released on 2026-11-15.

NumPy 2.5.5 is a patch release that fixes bugs discovered after the 2.5.4
release. It is unusually large for a patch release due to bugs discovered
during continuing work on strings for the upcoming 2.6.0 release, ongoing
threading work, the eMudhra compromise fixes, and updates in GitHub CI
infrastructure.

This release supports Python versions 3.12-3.15.

Compatibility notes

  • Casting a structured void dtype or subarray dtype to
    numpy.dtypes.StringDType now raises a TypeError instead of
    interpreting the raw bytes of each element as UTF-8.

    (gh-33298)

Contributors

A total of 12 people contributed to this release. People with a "+" by their
names contributed a patch for the first time.

  • Anush Vishwakarma +
  • Arthur Lacote
  • Bharath Pranav +
  • Charles Harris
  • David King +
  • Iason Krommydas
  • Joren Hammudoglu
  • Kevin Sheppard
  • Matti Picus
  • Nathan Goldbaum
  • Peter Hawkins
  • Shubham Bansal +

Pull requests merged

A total of 37 pull requests were merged for this release.

  • #32971: MAINT: Prepare 2.5.x for further development
  • #33100: MAINT: Update OpenBLAS to 0.3.34.237.2
  • #33114: MAINT: Update cibuildwheel to v4.3.3
  • #33117: BUG: warm finfo cache with float64 on 2.5.x (gh-32947)
  • #33130: MAINT: Update pixi workflow from main.
  • #33141: MAINT: Update cibuildwheel to v4.3.4 and uv to v0.13.5
  • #33155: BUG: fix nanquantile dtype for all-NaN first slice (#32940)
  • #33156: BUG: fix hang in ndarray.take for a zero-size axis (#32991)
  • #33158: BUG: fix reference leak for multi-output ufuncs (#33011)
  • #33159: BUG: fix ufunc.at segfaulting for nin=0 (#33068)
  • #33160: MAINT: Remove cygwin test.
  • #33177: CI: clone eigen from github mirror for ml_dtypes test (#33164)
  • #33179: BUG: fix complex sqrt rescaling (#33126)
  • #33180: BUG: fix bytes/unicode counting mixups in startswith, endswith...
  • #33181: BUG: fix bytes/codepoint confusion in string fastsearch (#33176)
  • #33182: TYP: dtype.descr: fix item type (#33037)
  • #33225: BUG: make SeedSequence.spawn thread safe (#32889)
  • #33226: BUG: bounds check before writing values in StringDType to integer...
  • #33228: BUG: fix error checks done without the GIL in sorting functions...
  • #33229: BUG: acquire the GIL to set errors and warnings in bytes to datetime...
  • #33231: MAINT: Update macos_14 to macos_15.
  • #33234: BUG: acquire the GIL in nditer and ufunc error paths (#33224)
  • #33238: BUG: avoid out-of-bounds reads in datetime parsing API errors...
  • #33265: REV: "BUG: make SeedSequence.spawn thread safe (#32889)"
  • #33284: DOC: pin sphinx-design to < 0.8
  • #33293: BUG: check for allocation failure in StringDType string allocation...
  • #33294: BUG: release the input of casts to object when move_references...
  • #33295: BUG: reject 6-tuple dtype pickle states with version > 1 (#33257)
  • #33311: MAINT: update circleci redirector action (#33304)
  • #33313: BUG: fix loadtxt crash with existing StringDType dtype (#33266)
  • #33314: BUG: reject casts from structured dtypes to StringDType (#33298)
  • #33315: BUG: ufunc.at: raise on a non-writeable first operand (#33285)
  • #33316: BUG: Prevent MT19937 and Philox from accepting invalid buffer...
  • #33317: BUG: Correct numel calculation in random_raw (#33309)
  • #33338: CI: pin ubuntu 24.04 where 26.04 is broken (#33335)
  • #33339: BUG: fix np.negative with strided input and output (#33327)
  • #33340: MAINT: Update cibuildwheel to 4.3.5.

v2.5.4 (Oct 10, 2026)

Choose a tag to compare

@charris charris released this 10 Oct 21:30
Immutable release. Only release title and notes can be modified.
v2.5.4
a3d0ef1

NumPy 2.5.4 Release Notes

Released on 2026-10-10.

NumPy 2.5.4 is a patch release that fixes bugs discovered after the 2.5.3
release. Highlights are:

  • Many typing fixes and improvements,
  • A workaround for the MSVC 19.51 bug, see below.

This release supports Python versions 3.12-3.15.

Improvements

  • numpy.linalg.svd and numpy.linalg.lstsq now raise for inputs containing
    infinities instead of returning garbage results.

  • Fixed hangs in numpy.linalg.svd and numpy.linalg.lstsq for certain inputs
    containing infinities for recent versions of some LAPACK implementations.

  • numpy.linalg.cond now handles non-finite inputs more consistently.

(gh-32593)

StringDType hashing with NaN sentinels

StringDType instances with equivalent floating-point NaN sentinels now
have equal hashes. Previously, distinct NaN objects could produce equal
dtype instances with different hashes, causing dictionary lookups and set
deduplication to fail.

(gh-32563)

Changes

MaskedArray resets a fill_value that cannot be represented in a new dtype

A fill_value copied from a source array is now reset to the default fill_value
for the new dtype when it cannot be represented in that dtype. Previously the
copied value could be stale: ufuncs that change dtype left the result holding a
fill_value typed for the old dtype, which raised a TypeError only when
something later validated it (such as .view()), and a floating point
fill_value that overflows an integer dtype was kept as an out-of-range value
together with a RuntimeWarning. Both now fall back to the default,
including when a masked array is passed to MaskedArray with a different
dtype. A fill_value given explicitly by the user is still validated and
raises as before. This can now raise a ComplexWarning if the fill_value is
complex and the new dtype is real.

(gh-32508)
(gh-32562)

Contributors

A total of 9 people contributed to this release. People with a "+" by their
names contributed a patch for the first time.

  • Aniket Singh Yadav
  • Bhuvansh Kataria +
  • Charles Harris
  • Iason Krommydas
  • Joren Hammudoglu
  • Lazizbek Ergashev +
  • Nathan Goldbaum
  • Sebastian Berg
  • Yeonho Kim

Pull requests merged

A total of 17 pull requests were merged for this release.

  • #32520: MAINT: Prepare 2.5.x for further development
  • #32557: BUG: Reset an unrepresentable fill_value on a dtype change (#32508)
  • #32565: BLD: work around MSVC 19.51 bug (#32561)
  • #32600: BUG: fix np.strings.replace truncating old/new to a's
  • #32707: BUG: fix [ureduce]{#ureduce} reshape when a kept axis has size 0 (#32536)
  • #32709: BUG: fix two possible crashes in the ufunc.accumulate implementation...
  • #32710: BUG: Reset an inherited fill_value in MaskedArray.__new__ as...
  • #32711: ENH: Improvements and fixes for stringdtype hashing (#32563)
  • #32713: CI: increase ppc64le timeout to match other timeouts (#32583)
  • #32718: BUG: fix memory leak in legacy ArrayMethod wrapper code
  • #32719: BUG: check for non-finite input before calling gesdd/gelsd and...
  • #32738: BUG: fix segfault in as_arrays() on self-referencing pyscalars
  • #32741: TYP: Various typing improvements.
  • #32791: BUG: Fix canonicalization/promotion of nested subarray types...
  • #32888: MAINT: Update vendored-meson to match main.
  • #32904: TYP: Backport a number of typing updates.
  • #32956: TYP: Various typing fixes and improvements.

v2.5.3 (Sep 6, 2026)

Choose a tag to compare

@charris charris released this 06 Sep 16:37
Immutable release. Only release title and notes can be modified.
v2.5.3
dd88c0c

NumPy 2.5.3 Release Notes

The NumPy 2.5.3 is a patch release that fixes bugs discovered after the 2.5.2
release. Apart from the usual bug and maintenance work, there are a number of
StringDType related fixes for problems discovered during the ongoing string
work in the main branch.

This release supports Python versions 3.12-3.15

Changes

  • Casting a fixed-width byte string array (np.bytes_) to StringDType
    now raises TypeError when the bytes are not valid UTF-8. Previously the
    invalid bytes were stored as-is and later caused undefined behavior in
    string operations.

    (gh-32296)

  • MaskedArray._fill_value would become stale when ufuncs that change dtype
    left the result holding a fill_value typed for the old dtype. The mismatch
    was silent until something later called _check_fill_value, such as
    .view(), and then a TypeError would be raised. Now, when the copied
    fill_value is no longer valid for the new dtype, fall back to the
    default fill_value for that dtype instead of propagating the stale value.
    This may raise a ComplexWarning if the fill_value is complex and the
    new dtype is real.

    (gh-32423)

Contributors

A total of 9 people contributed to this release. People with a "+" by their
names contributed a patch for the first time.

  • Charles Harris
  • Iason Krommydas
  • James Davies +
  • Joren Hammudoglu
  • Maanas Arora
  • Matti Picus
  • Nathan Goldbaum
  • Shikhar Goel +
  • Yeonho Kim +

Pull requests merged

A total of 27 pull requests were merged for this release.

  • #32235: MAINT: Prepare 2.5.x for further development
  • #32289: BUG: raise ValueError when reading into record array with references...
  • #32290: BUG: avoid uninitialized memory access / NULL-pointer deref in...
  • #32291: TYP: fix np.random.{get,set}_bit_generator implicit re-exports...
  • #32292: BUG: don't assume strides are a multiple of itemsize in stringdtype...
  • #32293: CI: fix ccache CC override, add CXX in mac Conda CI (#32285)
  • #32303: BUG: Fix ref leak in [convert_from_type]{#convert_from_type} for custom scalar types...
  • #32304: BUG: fix a number of issues around iterators and StringDType...
  • #32326: TST: avoid allocating huge tuple of arrays in concatenate test...
  • #32338: BUG: avoid possible UB in 'safe' multiplication helpers (#32294)
  • #32339: MAINT: use PyObject_ functions instead of raw PyArray_ ones (#32331)
  • #32378: BUG: validate UTF-8 and harden StringDType bounds handling (#32296)
  • #32380: BUG: fix two error handling mistakes in stringdtype replace loop...
  • #32381: BUG: fix visibility annotations for functions in StringDType...
  • #32384: MAINT: Update ml_dtypes pin to 8/21/2026.
  • #32385: MAINT: Update numpy/_core/src/umath/svml
  • #32410: MAINT: skip failing cython limited API tests on Cython 3.3.0...
  • #32427: BUG: close duplicated file descriptor if fdopen fails (#32386)
  • #32428: MAINT: add missing space in warning and error messages (#32405)
  • #32430: BUG: fix error handling in StringDType to fixed-width bytes case...
  • #32441: MAINT: Only run nightly BLAS tests on main.
  • #32471: BUG: fix memory leak in StringDType creation error path (#32470)
  • #32477: BUG: fix stale fill_value after ufuncs change MaskedArray dtype...
  • #32478: MAINT: exit deadlock tests quickly on slow hardware (#32466)
  • #32481: BUG: Backport StringDType byteorder fixes
  • #32506: DOC: use static scipy doc site for intershpinx (#32503)
  • #32509: BUG: fix crash in ufunc.resolve_dtypes with a Python scalar type...

v2.5.2 (Aug 9, 2026)

Choose a tag to compare

@charris charris released this 09 Aug 17:42
Immutable release. Only release title and notes can be modified.
v2.5.2
48fecee

NumPy 2.5.2 Release Notes

The NumPy 2.5.2 is a patch release that fixes bugs discovered after the 2.5.1
release. The big news is that it includes wheels for the newly released
Python 3.15.0rc1.

This release supports Python versions 3.12-3.15

C API changes

PyArray_StringDTypeObject is opaque under the abi3t stable ABI

The PyArray_StringDTypeObject was accidentally exposed in NumPy
2.5 when targeting the free-threading-compatible stable ABI
(Py_TARGET_ABI3T). PyArray_StringDTypeObject is now an opaque
struct: extensions compiled that way cannot access its fields, since
the struct layout depends on the size of the object header. Any code
that accessed PyArray_StringDTypeObject fields in an abi3t build
would have crashed, so we are making this API change in a bugfix
release.

The NpyString allocator API remains usable by passing the
descriptor object pointer, e.g.
NpyString_acquire_allocator((PyArray_StringDTypeObject *)descr).

(gh-31771)

Contributors

A total of 16 people contributed to this release. People with a "+" by their
names contributed a patch for the first time.

  • Abhijeetsingh Meena +
  • Charalampos Stratakis
  • Charles Harris
  • Chris Ninham +
  • David Woods
  • Geonho +
  • Gopu Yeshwanth Reddy +
  • Iason Krommydas
  • Ijtihed Kilani
  • Jelle Zijlstra +
  • Joren Hammudoglu
  • Kumar Aditya
  • Mike Boyle
  • Nathan Goldbaum
  • Raghuveer Devulapalli
  • Sebastian Berg

Pull requests merged

A total of 28 pull requests were merged for this release.

  • #31864: MAINT: Prepare 2.5.x for further development
  • #31889: TYP: Backport multiple static typing fixes 1.
  • #31900: TST: add tests for stable ABI numpy extensions (#31822)
  • #31901: BUG: fix StringDType coerce flag in binary ufunc promotion...
  • #31902: BLD: fix meson deprecation warnings (#31892)
  • #31921: TYP: Backport multiple typing fixes 2.
  • #31947: MAINT: Update x86-simd-sort subproject (5adb334 → fa944ef) (#31908)
  • #31949: BUG: fix crash on 32 bit systems using abi3t (#31771)
  • #31950: MNT: remove some obsolete string to bool workarounds (#31859)
  • #31952: BUG: centralized helper for output coerce and na_object in stringdtype...
  • #31953: BUG: fix CPU feature env diagnostic buffer overruns (#31905)
  • #31954: BUG: restore ndarray.conjugate() for legacy user-defined dtypes...
  • #31955: TYP: Avoid shadowed dtype annotations
  • #32077: MAINT: Update verdored-meson/meson to match main.
  • #32114: BUG: fix refcount leak on overlapping copyto with where=False
  • #32115: BUG: fix swallowed cast error in fancy indexing assignment (#31975)
  • #32116: BUG: Fix buffered iterator stride after removing multi-index
  • #32117: BUG: fix np.fromiter corruption when reusing a StringDType...
  • #32119: BUG: add a special case for StringDType in np.isdtype (#32030)
  • #32121: BUG: reference leak in simd_sequence_from_iterable (#32038)
  • #32122: BUG: ensure lock is held when accessing or writing to RNG state...
  • #32123: BUG: fully reset cached RNG state for non-MT19937 RNGs (#32062)
  • #32135: TYP: type capabilities max dimensions
  • #32158: BUG: avoid possible stack overflow in arraydescr_dealloc (#32133)
  • #32206: MAINT: Update cibuildwheel to v4.2.0
  • #32214: MAINT: Skip limited_api tests on some platforms.
  • #32220: TYP: isclose shape-typing fix for 2d array-likes (#32205)
  • #32221: BUG: avoid segfaults when legacy copyswap slot is not defined...

v2.5.1 (July 4, 2026)

Choose a tag to compare

@charris charris released this 04 Jul 17:30
Immutable release. Only release title and notes can be modified.
v2.5.1
5e1d03f

NumPy 2.5.1 Release Notes

The NumPy 2.5.1 is a patch release that fixes bugs discovered after the 2.5.0
release. The most noticeable is the fix is to the numpy datetime cython API
which should allow downstream to support NumPy versions older than 2.5.
Preparation for Python 3.15 continues along with typing improvements.

This release supports Python versions 3.12-3.14

Changes

  • The minimum supported GCC version has been updated from 9.3.0 to 10.3.0

    (gh-31843)

Contributors

A total of 10 people contributed to this release. People with a "+" by their
names contributed a patch for the first time.

  • Adhyan Gupta +
  • Ankit Ahlawat
  • Charles Harris
  • Iason Krommydas
  • Joren Hammudoglu
  • Kumar Aditya
  • Nathan Goldbaum
  • Sebastian Berg
  • Ties Jan Hefting +
  • Vineet Kumar

Pull requests merged

A total of 20 pull requests were merged for this release.

  • #31707: MAINT: Prepare 2.5.x for further development
  • #31721: CI: fix new cython-lint errors (#31711)
  • #31723: MAINT: Update meson to match main
  • #31729: TST: use setup-sde instead of curl to get SDE binaries (#31727)
  • #31829: BUG: Relax finfo to be easier accessible for all user dtypes...
  • #31831: TYP: Fix flatiter.__next__ return type for object_ and...
  • #31832: BUG: avoid deadlocks using NpyString API (#31682)
  • #31833: BUG: fix out array leak in reduceat and accumulate when dtype...
  • #31835: BUG: fix numpy datetime cython APIs to be compatible with older...
  • #31836: TYP: Fix incorrect dtype inference of asarray([]) (#31732)
  • #31837: TYP: Fix np.ma.masked_array 2.5.0 regression
  • #31838: FIX: Refactor error handling in array_setstate to prevent typecode...
  • #31839: TST: xfail multithreaded BLAS test more generously
  • #31840: MAINT: Rename subroutine for crackfortran tests
  • #31842: BUG: fix leak in reductions when a ufunc override errors or is...
  • #31849: BLD: set minimum required gcc version to 10.3 (#31843)
  • #31855: CI: fix hangs on MacOS ASan CI (#31853)
  • #31856: BUG: fix several bugs in StringDType operations (#31846)
  • #31857: BUG: Fix segfault in MT19937 by preventing recursive seed lists...
  • #31858: BUG: Fix signed integer overflow in datetime.c (#31688)

v2.5.0 (June 21, 2026)

Choose a tag to compare

@charris charris released this 21 Jun 21:28
Immutable release. Only release title and notes can be modified.
v2.5.0
6910b28

NumPy 2.5.0 Release Notes

Numpy 2.5.0 is a transitional release. It drops support for Python 3.11,
marking the end of distutils, and expires a large number of deprecations made
in the 2.0.x release. It also improves free threading and brings sorting into
compliance with the array-api standard with the addition of descending sorts.
There is also a fair amount of preparation for Python 3.15, which will be
supported starting with the first rc.

This release supports Python versions 3.12-3.14.

Highlights

  • Distutils has been removed,
  • Many expired deprecations, see below,
  • Many new deprecations, see below,
  • Many static typing improvements.
  • Improved support for free threading,
  • Support for descending sorts,

See New Features below for other additions.

Deprecations

  • numpy.char.chararray is deprecated. Use an ndarray with a string or bytes dtype instead.

    (gh-30605)

  • numpy.take now correctly checks if the result can be cast to the provided
    out=out under the same-kind rule. A DeprecationWarning is given now
    when this check fails. Previously, take incorrectly checked if out
    could be cast to the result (the wrong direction). This deprecation also
    affects compress and possibly other functions. (Future versions of NumPy
    may tighten the casting check further.)

    (gh-30615)

  • The numpy.char.[as]array functions are deprecated. Use an
    numpy.[as]array with a string or bytes dtype instead.

    (gh-30802)

  • Setting the dtype attribute is deprecated because mutating an array is unsafe
    if an array is shared, especially by multiple threads. As an alternative,
    you can create a view with a new dtype via array.view(dtype=new_dtype).

    (gh-29244)

  • Setting the shape attribute is deprecated because mutating an array is
    unsafe if an array is shared, especially by multiple threads. As an
    alternative, you can create a new view via np.reshape or
    np.ndarray.reshape. For example: x = np.arange(15); x = np.reshape(x, (3, 5)).
    To ensure no copy is made from the data, one can use np.reshape(..., copy=False).

    While setting the shape on an array is discouraged, for cases where it is
    difficult to work around, e.g., in __array_finalize__, it is possible
    with the private method np.ndarray._set_shape.

    (gh-29536)

  • Using the generic unit in numpy.timedelta64 is deprecated since this
    can lead to unexpected behavior such as non-transitive comparison, see
    gh-28287 for details. As
    an alternative, specify an explicit unit such as 's' (seconds) or 'D'
    (days) when constructing numpy.timedelta64. Due to this change, operations
    that implicitly rely on the generic unit are also deprecated. For
    example:

    arr = np.array([1, 2, 3], dtype="m8[s]")
    
    # `1` is implicitly converted to generic timedelta64
    arr + 1
    

    (gh-29619)

  • Resizing a Numpy array in place is deprecated since mutating an array is
    unsafe if an array is shared, especially by multiple threads. As an
    alternative, you can create a resized array via np.resize.

    (gh-30181)

  • numpy.fix is deprecated, use numpy.trunc instead. It is faster and
    follows the Array API standard. Both functions provide identical
    functionality: rounding array elements towards zero.

    (gh-30644)

  • numpy.ma.round_ is deprecated. numpy.ma.round can be used as a
    replacement.

    (gh-30738)

  • numpy.typename is deprecated because the names returned by it were
    outdated and inconsistent. numpy.dtype.name can be used as a
    replacement.

    (gh-30774)

  • Inputs other than integers are deprecated for numpy.triu_indices and
    numpy.tril_indices. Non-integer values for the M, k and N
    parameters of numpy.tri are deprecated. Non-integer values for the k
    parameter of both numpy.tril_indices_from and numpy.triu_indices_from
    are deprecated.

    (gh-30869)

  • Deprecations in custom dtype property and __array_finalize__.

    Previously arr.view(dtype=new_dtype) called arr.dtype = new_dtype
    also for subclasses, i.e., the attribute setting. That path is now
    deprecated and refined, meaning that even subclasses that do not see this
    DeprecationWarning may wish to update their code.

    A subclass that does any dtype specific logic (i.e. verifying the dtype
    in __array_finalize__ or has a dtype property) should now:

    • Set _set_dtype = None in which case arr.view(dtype=new_dtype)
      will call __array_finalize__ with the new dtype, ensuring that
      any validation __array_finalize__ will run is done.
    • Or, for a quick fix, define _set_dtype as a function (calling
      ndarray._set_dtype() to avoid DeprecationWarnings.
      (Future versions might migrate towards the _set_dtype = None path.)

    Ideally, follow NumPy's deprecation to prevent dtype mutation by users.
    The use of ndarray._set_dtype() may be necessary for some subclass
    finalization patterns, but should otherwise be avoided.

    (gh-31293)

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)

    (gh-30463)

  • 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)

  • The numpy.chararray re-export of numpy.char.chararray has been removed.
    (deprecated since 2.0)

    (gh-30604)

  • bincount now raises a TypeError for non-integer inputs.
    (deprecated since 2.1)

    (gh-30610)

  • The numpy.lib.math alias for the standard library math module has
    been removed.
    (deprecated since 1.25)

    (gh-30612)

  • Data type alias 'a' was removed in favor of 'S'.
    (deprecated since 2.0)

    (gh-30613)

  • _add_newdoc_ufunc(ufunc, newdoc) has been removed in favor of
    ufunc.__doc__ = newdoc.
    (deprecated since 2.2)

    (gh-30614)

Compatibility notes

linalg.eig and linalg.eigvals now always return complex arrays

Previously, the return values depended on whether the eigenvalues happen to lie
on the real line (which, for a general, non-symmetric matrix, is not
guaranteed).

This change makes consistent what was a value-dependent result. To retain the
previous behavior, do:

w = eigvals(a)
if np.any(w.imag == 0):  # this is what NumPy used to do
    w = w.real

If your matrix is symmetrix/hermitian, use eigh and eigvalsh instead of
eig and eigvals. These are guaranteed to return real values. A common
case is covariance matrices, which are symmetric and positive definite by
construction.

(gh-30411)

MSVC support

NumPy now requires minimum MSVC 19.35 toolchain version on Windows platforms.
This corresponds to Visual Studio 2022 version 17.5 Preview 2 or newer.

(gh-30489)

Cython support

NumPy's Cython headers (accessed via cimport numpy) now require Cython 3.0
or newer to build. If you try to compile a project that depends on NumPy's
Cython headers using Cython 0.29 or older, you will see a message like this:

Error compiling Cython file:
------------------------------------------------------------
...
# versions.
#
# See __init__.cython-30.pxd for the real Cython header
#

DEF err = int('Build aborted: the NumPy Cython headers require Cython 3.0.0 or newer.')
  ------------------------------------------------------------

  /path/to/site-packages/numpy/__init__.pxd:11:13: Error in compile-time expression:
  ValueError: invalid literal for int() with base 10: 
  'Build aborted: the NumPy Cython headers require Cython 3.0.0 or newer.'

Note that the invalid integer is not a bug in NumPy - we are intentionally
generating this error to avoid triggering a more obscure error later in the
build when an older Cython version tries to use a Cython feature that was not
available in the old Cython version.

(gh-30770)

numpy.where no longer truncates Python integers

Previously, if the x or y argument of numpy.where was a Python
integer that was out of range of the output type, it would be silently
...

Read more

v2.5.0rc1 (June 2, 2026)

Pre-release

Choose a tag to compare

@charris charris released this 02 Jun 13:52
Immutable release. Only release title and notes can be modified.
v2.5.0rc1
947c918

NumPy 2.5.0 Release Notes

Numpy 2.5.0 is a transitional release. It drops support for Python 3.11,
marking the end of distutils, and expires a large number of deprecations made
in the 2.0.x release. It also improves free threading and brings sorting into
compliance with the array-api standard with the addition of descending sorts.
Python 3.15 will be supported when it is released.

This release supports Python versions 3.12-3.14.

Highlights

  • Distutils has been removed,
  • Many expired deprecations, see below,
  • Many new deprecations, see below,
  • Many static typing improvements.
  • Improved support for free threading,
  • Support for descending sorts,

See New Features below for other additions.

Deprecations

  • numpy.char.chararray is deprecated. Use an ndarray with a string or bytes dtype instead.

    (gh-30605)

  • numpy.take now correctly checks if the result can be cast to the provided
    out=out under the same-kind rule. A DeprecationWarning is given now
    when this check fails. Previously, take incorrectly checked if out
    could be cast to the result (the wrong direction). This deprecation also
    affects compress and possibly other functions. (Future versions of NumPy
    may tighten the casting check further.)

    (gh-30615)

  • The numpy.char.[as]array functions are deprecated. Use an
    numpy.[as]array with a string or bytes dtype instead.

    (gh-30802)

  • Setting the dtype attribute is deprecated because mutating an array is unsafe
    if an array is shared, especially by multiple threads. As an alternative,
    you can create a view with a new dtype via array.view(dtype=new_dtype).

    (gh-29244)

  • Setting the shape attribute is deprecated because mutating an array is
    unsafe if an array is shared, especially by multiple threads. As an
    alternative, you can create a new view via np.reshape or
    np.ndarray.reshape. For example: x = np.arange(15); x = np.reshape(x, (3, 5)).
    To ensure no copy is made from the data, one can use np.reshape(..., copy=False).

    While setting the shape on an array is discouraged, for cases where it is
    difficult to work around, e.g., in __array_finalize__, it is possible
    with the private method np.ndarray._set_shape.

    (gh-29536)

  • Using the generic unit in numpy.timedelta64 is deprecated since this
    can lead to unexpected behavior such as non-transitive comparison, see
    gh-28287 for details. As
    an alternative, specify an explicit unit such as 's' (seconds) or 'D'
    (days) when constructing numpy.timedelta64. Due to this change, operations
    that implicitly rely on the generic unit are also deprecated. For
    example:

    arr = np.array([1, 2, 3], dtype="m8[s]")
    
    # `1` is implicitly converted to generic timedelta64
    arr + 1
    

    (gh-29619)

  • Resizing a Numpy array in place is deprecated since mutating an array is
    unsafe if an array is shared, especially by multiple threads. As an
    alternative, you can create a resized array via np.resize.

    (gh-30181)

  • numpy.fix is deprecated, use numpy.trunc instead. It is faster and
    follows the Array API standard. Both functions provide identical
    functionality: rounding array elements towards zero.

    (gh-30644)

  • numpy.ma.round_ is deprecated. numpy.ma.round can be used as a
    replacement.

    (gh-30738)

  • numpy.typename is deprecated because the names returned by it were
    outdated and inconsistent. numpy.dtype.name can be used as a
    replacement.

    (gh-30774)

  • Inputs other than integers are deprecated for numpy.triu_indices and
    numpy.tril_indices. Non-integer values for the M, k and N
    parameters of numpy.tri are deprecated. Non-integer values for the k
    parameter of both numpy.tril_indices_from and numpy.triu_indices_from
    are deprecated.

    (gh-30869)

  • Deprecations in custom dtype property and __array_finalize__.

    Previously arr.view(dtype=new_dtype) called arr.dtype = new_dtype
    also for subclasses, i.e., the attribute setting. That path is now
    deprecated and refined, meaning that even subclasses that do not see this
    DeprecationWarning may wish to update their code.

    A subclass that does any dtype specific logic (i.e. verifying the dtype
    in __array_finalize__ or has a dtype property) should now:

    • Set _set_dtype = None in which case arr.view(dtype=new_dtype)
      will call __array_finalize__ with the new dtype, ensuring that
      any validation __array_finalize__ will run is done.
    • Or, for a quick fix, define _set_dtype as a function (calling
      ndarray._set_dtype() to avoid DeprecationWarnings.
      (Future versions might migrate towards the _set_dtype = None path.)

    Ideally, follow NumPy's deprecation to prevent dtype mutation by users.
    The use of ndarray._set_dtype() may be necessary for some subclass
    finalization patterns, but should otherwise be avoided.

    (gh-31293)

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)

    (gh-30463)

  • 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)

  • The numpy.chararray re-export of numpy.char.chararray has been removed.
    (deprecated since 2.0)

    (gh-30604)

  • bincount now raises a TypeError for non-integer inputs.
    (deprecated since 2.1)

    (gh-30610)

  • The numpy.lib.math alias for the standard library math module has
    been removed.
    (deprecated since 1.25)

    (gh-30612)

  • Data type alias 'a' was removed in favor of 'S'.
    (deprecated since 2.0)

    (gh-30613)

  • _add_newdoc_ufunc(ufunc, newdoc) has been removed in favor of
    ufunc.__doc__ = newdoc.
    (deprecated since 2.2)

    (gh-30614)

Compatibility notes

linalg.eig and linalg.eigvals now always return complex arrays

Previously, the return values depended on whether the eigenvalues happen to lie
on the real line (which, for a general, non-symmetric matrix, is not
guaranteed).

This change makes consistent what was a value-dependent result. To retain the
previous behavior, do:

w = eigvals(a)
if np.any(w.imag == 0):  # this is what NumPy used to do
    w = w.real

If your matrix is symmetrix/hermitian, use eigh and eigvalsh instead of
eig and eigvals. These are guaranteed to return real values. A common
case is covariance matrices, which are symmetric and positive definite by
construction.

(gh-30411)

MSVC support

NumPy now requires minimum MSVC 19.35 toolchain version on Windows platforms.
This corresponds to Visual Studio 2022 version 17.5 Preview 2 or newer.

(gh-30489)

Cython support

NumPy's Cython headers (accessed via cimport numpy) now require Cython 3.0
or newer to build. If you try to compile a project that depends on NumPy's
Cython headers using Cython 0.29 or older, you will see a message like this:

Error compiling Cython file:
------------------------------------------------------------
...
# versions.
#
# See __init__.cython-30.pxd for the real Cython header
#

DEF err = int('Build aborted: the NumPy Cython headers require Cython 3.0.0 or newer.')
  ------------------------------------------------------------

  /path/to/site-packages/numpy/__init__.pxd:11:13: Error in compile-time expression:
  ValueError: invalid literal for int() with base 10: 
  'Build aborted: the NumPy Cython headers require Cython 3.0.0 or newer.'

Note that the invalid integer is not a bug in NumPy - we are intentionally
generating this error to avoid triggering a more obscure error later in the
build when an older Cython version tries to use a Cython feature that was not
available in the old Cython version.

(gh-30770)

numpy.where no longer truncates Python integers

Previously, if the x or y argument of numpy.where was a Python
integer that was out of range of the output type, it would be silently
truncated. Now, an OverflowError will be raised instead.

T...

Read more

v2.4.6 (May 18, 2026)

Choose a tag to compare

@charris charris released this 19 May 01:01
Immutable release. Only release title and notes can be modified.
v2.4.6
b832a09

NumPy 2.4.6 Release Notes

NumPy 2.4.6 is a quick release that fixes a regression discovered in the 2.4.5
release.

This release supports Python versions 3.11-3.14

Contributors

A total of 4 people contributed to this release. People with a "+" by their
names contributed a patch for the first time.

  • !EarlMilktea
  • Charles Harris
  • Sebastian Berg
  • Warren Weckesser

Pull requests merged

A total of 4 pull requests were merged for this release.

  • #31444: MAINT: Prepare 2.4.x for further development
  • #31453: BUG: Fix regression in arr.conj()
  • #31459: BUG: np.linalg.svd(..., hermitian=True) returns non-unitary...
  • #31460: BUG: Don't call INCREF/DECREF on descr in NpyStringAcquireAllocator...

v2.4.5 (May 15, 2026)

Choose a tag to compare

@charris charris released this 15 May 20:46
Immutable release. Only release title and notes can be modified.
v2.4.5
26e8185

NumPy 2.4.5 Release Notes

NumPy 2.4.5 is a patch release that fixes bugs discovered after the 2.4.4
release, has some typing improvements, and maintains infrastructure.

This release supports Python versions 3.11-3.14

Contributors

A total of 17 people contributed to this release. People with a "+" by their
names contributed a patch for the first time.

  • Aleksei Nikiforov
  • Anarion Zuo +
  • Ankit Ahlawat
  • Breno Favaretto +
  • Charles Harris
  • Igor Krivenko +
  • Ijtihed Kilani +
  • Joren Hammudoglu
  • Maarten Baert +
  • Matti Picus
  • Nathan Goldbaum
  • Praneeth Kodumagulla +
  • Ralf Gommers
  • RoomWithOutRoof +
  • Sebastian Berg
  • Warren Weckesser
  • div +

Pull requests merged

A total of 28 pull requests were merged for this release.

  • #31093: MAINT: Prepare 2.4.x for further development
  • #31182: TYP: fix np.shape assignability issue for python lists (#31171)
  • #31197: ENH: Return rank 0 for empty matrices in matrix_rank (#30422)
  • #31198: CI/BUG: add native jobs for s390x, fix bug in pack_inner...
  • #31199: BUG: f2py map complex_long_double to NPY_CLONGDOUBLE
  • #31205: MAINT: f2py: Stop setting re._MAXCACHE to 50.
  • #31206: BUG: fix heap buffer overflow in timedelta to string casts
  • #31207: MAINT: Rename ppc64le and s390x workflow (#31121)
  • #31208: BUG: Fix matvec/vecmat in-place aliasing (out=input produces...
  • #31209: TYP: tile: accept numpy scalars and arrays as second argument...
  • #31211: DEP: Undo deprecation for np.dtype() signature used by old pickles...
  • #31212: REV: Manual revert of float16 svml use (#31178)
  • #31222: TYP: ix_ fix for boolean and non-1d input (#31218)
  • #31329: BUG: incorrect temp elision for new-style (NEP 43) user-defined...
  • #31330: TYP: fix sliding_window_view axis parameter typing
  • #31335: BUG: Prevent deadlock due to downstream importing NumPy in dlopen...
  • #31336: BUG: Fix segfault in nditer.multi_index when __getitem__ raises...
  • #31338: TYP: Fix ruff lint error
  • #31357: BUG: fix memory leak in np.zeros when fill-zero loop raises (#31320)
  • #31358: BUG: np.einsum() fails with a 0-dimensional out argument and...
  • #31379: BUG: Fix signed overflow issue in npy_gcd for INT_MIN on s390x...
  • #31383: CI: remove Cirrus CI FreeBSD job (#31380)
  • #31390: BUILD: newer MKL uses so.3
  • #31391: BLD/MAINT: improve support for Intel LLVM compilers
  • #31401: BUG: Avoid UB in safe[add,sub,mul] helpers (#31396)
  • #31402: BUG: exclude __pycache__ directories from wheels (#31397)
  • #31404: TYP: _NestedSequence type parameter default to work around...
  • #31426: TYP: Fix DTypeLike runtime type-checker support (#31425)

2.4.4 (Mar 29, 2026)

Choose a tag to compare

@charris charris released this 29 Mar 13:38
Immutable release. Only release title and notes can be modified.
v2.4.4
be93fe2

NumPy 2.4.4 Release Notes

The NumPy 2.4.4 is a patch release that fixes bugs discovered after the 2.4.3
release. It should finally close issue #30816, the OpenBLAS threading problem
on ARM.

This release supports Python versions 3.11-3.14

Contributors

A total of 8 people contributed to this release. People with a "+" by their
names contributed a patch for the first time.

  • Charles Harris
  • Daniel Haag +
  • Denis Prokopenko +
  • Harshith J +
  • Koki Watanabe
  • Marten van Kerkwijk
  • Matti Picus
  • Nathan Goldbaum

Pull requests merged

A total of 7 pull requests were merged for this release.

  • #30978: MAINT: Prepare 2.4.x for further development
  • #31049: BUG: Add test to reproduce problem described in #30816 (#30818)
  • #31052: BUG: fix FNV-1a 64-bit selection by using NPY_SIZEOF_UINTP (#31035)
  • #31053: BUG: avoid warning on ufunc with where=True and no output
  • #31058: DOC: document caveats of ndarray.resize on 3.14 and newer
  • #31079: TST: fix POWER VSX feature mapping (#30801)
  • #31084: MAINT: numpy.i: Replace deprecated sprintf with snprintf...