# NumPy changelog > Fundamental package for array-based numerical computing in Python. - Vendor: NumPy - Category: Frameworks & Libraries - Official site: https://numpy.org - Tracked by: What's New (https://whatsnew.fyi/product/numpy) - Harvested from: GitHub (numpy/numpy) - Entries below: 10 (newest first) What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. ## Releases ### v2.5.1 — v2.5.1 (July 4, 2026) - Date: 2026-07-04 - Version: v2.5.1 - Original notes: https://github.com/numpy/numpy/releases/tag/v2.5.1 - Permalink: https://whatsnew.fyi/product/numpy/releases/v2.5.1 #### 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](https://github.com/numpy/numpy/pull/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](https://github.com/numpy/numpy/pull/31707): MAINT: Prepare 2.5.x for further development - [#31721](https://github.com/numpy/numpy/pull/31721): CI: fix new `cython-lint` errors (#31711) - [#31723](https://github.com/numpy/numpy/pull/31723): MAINT: Update meson to match main - [#31729](https://github.com/numpy/numpy/pull/31729): TST: use setup-sde instead of curl to get SDE binaries (#31727) - [#31829](https://github.com/numpy/numpy/pull/31829): BUG: Relax finfo to be easier accessible for all user dtypes\... - [#31831](https://github.com/numpy/numpy/pull/31831): TYP: Fix `flatiter.__next__` return type for `object_` and\... - [#31832](https://github.com/numpy/numpy/pull/31832): BUG: avoid deadlocks using NpyString API (#31682) - [#31833](https://github.com/numpy/numpy/pull/31833): BUG: fix out array leak in reduceat and accumulate when dtype\... - [#31835](https://github.com/numpy/numpy/pull/31835): BUG: fix numpy datetime cython APIs to be compatible with older\... - [#31836](https://github.com/numpy/numpy/pull/31836): TYP: Fix incorrect dtype inference of `asarray([])` (#31732) - [#31837](https://github.com/numpy/numpy/pull/31837): TYP: Fix `np.ma.masked_array` 2.5.0 regression - [#31838](https://github.com/numpy/numpy/pull/31838): FIX: Refactor error handling in array_setstate to prevent typecode\... - [#31839](https://github.com/numpy/numpy/pull/31839): TST: xfail multithreaded BLAS test more generously - [#31840](https://github.com/numpy/numpy/pull/31840): MAINT: Rename subroutine for crackfortran tests - [#31842](https://github.com/numpy/numpy/pull/31842): BUG: fix leak in reductions when a ufunc override errors or is\... - [#31849](https://github.com/numpy/numpy/pull/31849): BLD: set minimum required gcc version to 10.3 (#31843) - [#31855](https://github.com/numpy/numpy/pull/31855): CI: fix hangs on MacOS ASan CI (#31853) - [#31856](https://github.com/numpy/numpy/pull/31856): BUG: fix several bugs in StringDType operations (#31846) - [#31857](https://github.com/numpy/numpy/pull/31857): BUG: Fix segfault in MT19937 by preventing recursive seed lists\... - [#31858](https://github.com/numpy/numpy/pull/31858): BUG: Fix signed integer overflow in datetime.c (#31688) ### v2.5.0 — v2.5.0 (June 21, 2026) - Date: 2026-06-21 - Version: v2.5.0 - Original notes: https://github.com/numpy/numpy/releases/tag/v2.5.0 - Permalink: https://whatsnew.fyi/product/numpy/releases/v2.5.0 #### 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](https://github.com/numpy/numpy/pull/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](https://github.com/numpy/numpy/pull/30615)) - The `numpy.char.[as]array` functions are deprecated. Use an `numpy.[as]array` with a string or bytes dtype instead. ([gh-30802](https://github.com/numpy/numpy/pull/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](https://github.com/numpy/numpy/pull/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](https://github.com/numpy/numpy/pull/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](https://github.com/numpy/numpy/issues/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](https://github.com/numpy/numpy/pull/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](https://github.com/numpy/numpy/pull/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](https://github.com/numpy/numpy/pull/30644)) - `numpy.ma.round_` is deprecated. `numpy.ma.round` can be used as a replacement. ([gh-30738](https://github.com/numpy/numpy/pull/30738)) - `numpy.typename` is deprecated because the names retur _[Truncated at 4000 characters — full notes: https://github.com/numpy/numpy/releases/tag/v2.5.0]_ ### v2.5.0rc1 — v2.5.0rc1 (June 2, 2026) - Date: 2026-06-02 - Version: v2.5.0rc1 - Original notes: https://github.com/numpy/numpy/releases/tag/v2.5.0rc1 - Permalink: https://whatsnew.fyi/product/numpy/releases/v2.5.0rc1 - Labels: Pre-release #### 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](https://github.com/numpy/numpy/pull/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](https://github.com/numpy/numpy/pull/30615)) - The `numpy.char.[as]array` functions are deprecated. Use an `numpy.[as]array` with a string or bytes dtype instead. ([gh-30802](https://github.com/numpy/numpy/pull/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](https://github.com/numpy/numpy/pull/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](https://github.com/numpy/numpy/pull/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](https://github.com/numpy/numpy/issues/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](https://github.com/numpy/numpy/pull/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](https://github.com/numpy/numpy/pull/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](https://github.com/numpy/numpy/pull/30644)) - `numpy.ma.round_` is deprecated. `numpy.ma.round` can be used as a replacement. ([gh-30738](https://github.com/numpy/numpy/pull/30738)) - `numpy.typename` is deprecated because the names returned by it were outdated and inconsistent. `numpy.dtype.name` _[Truncated at 4000 characters — full notes: https://github.com/numpy/numpy/releases/tag/v2.5.0rc1]_ ### v2.4.6 — v2.4.6 (May 18, 2026) - Date: 2026-05-19 - Version: v2.4.6 - Original notes: https://github.com/numpy/numpy/releases/tag/v2.4.6 - Permalink: https://whatsnew.fyi/product/numpy/releases/v2.4.6 #### 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](https://github.com/numpy/numpy/pull/31444): MAINT: Prepare 2.4.x for further development - [#31453](https://github.com/numpy/numpy/pull/31453): BUG: Fix regression in `arr.conj()` - [#31459](https://github.com/numpy/numpy/pull/31459): BUG: `np.linalg.svd(..., hermitian=True)` returns non-unitary\... - [#31460](https://github.com/numpy/numpy/pull/31460): BUG: Don't call INCREF/DECREF on descr in NpyStringAcquireAllocator\... ### v2.4.5 — v2.4.5 (May 15, 2026) - Date: 2026-05-15 - Version: v2.4.5 - Original notes: https://github.com/numpy/numpy/releases/tag/v2.4.5 - Permalink: https://whatsnew.fyi/product/numpy/releases/v2.4.5 #### 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](https://github.com/numpy/numpy/pull/31093): MAINT: Prepare 2.4.x for further development - [#31182](https://github.com/numpy/numpy/pull/31182): TYP: fix `np.shape` assignability issue for python lists (#31171) - [#31197](https://github.com/numpy/numpy/pull/31197): ENH: Return rank 0 for empty matrices in matrix_rank (#30422) - [#31198](https://github.com/numpy/numpy/pull/31198): CI/BUG: add native jobs for s390x, fix bug in `pack_inner`\... - [#31199](https://github.com/numpy/numpy/pull/31199): BUG: f2py map complex_long_double to NPY_CLONGDOUBLE - [#31205](https://github.com/numpy/numpy/pull/31205): MAINT: f2py: Stop setting re.\_MAXCACHE to 50. - [#31206](https://github.com/numpy/numpy/pull/31206): BUG: fix heap buffer overflow in timedelta to string casts - [#31207](https://github.com/numpy/numpy/pull/31207): MAINT: Rename ppc64le and s390x workflow (#31121) - [#31208](https://github.com/numpy/numpy/pull/31208): BUG: Fix matvec/vecmat in-place aliasing (out=input produces\... - [#31209](https://github.com/numpy/numpy/pull/31209): TYP: `tile`: accept numpy scalars and arrays as second argument\... - [#31211](https://github.com/numpy/numpy/pull/31211): DEP: Undo deprecation for np.dtype() signature used by old pickles\... - [#31212](https://github.com/numpy/numpy/pull/31212): REV: Manual revert of float16 svml use (#31178) - [#31222](https://github.com/numpy/numpy/pull/31222): TYP: `ix_` fix for boolean and non-1d input (#31218) - [#31329](https://github.com/numpy/numpy/pull/31329): BUG: incorrect temp elision for new-style (NEP 43) user-defined\... - [#31330](https://github.com/numpy/numpy/pull/31330): TYP: fix sliding_window_view axis parameter typing - [#31335](https://github.com/numpy/numpy/pull/31335): BUG: Prevent deadlock due to downstream importing NumPy in dlopen\... - [#31336](https://github.com/numpy/numpy/pull/31336): BUG: Fix segfault in nditer.multi_index when \_\_getitem\_\_ raises\... - [#31338](https://github.com/numpy/numpy/pull/31338): TYP: Fix ruff lint error - [#31357](https://github.com/numpy/numpy/pull/31357): BUG: fix memory leak in np.zeros when fill-zero loop raises (#31320) - [#31358](https://github.com/numpy/numpy/pull/31358): BUG: np.einsum() fails with a 0-dimensional out argument and\... - [#31379](https://github.com/numpy/numpy/pull/31379): BUG: Fix signed overflow issue in npy_gcd for INT_MIN on s390x\... - [#31383](https://github.com/numpy/numpy/pull/31383): CI: remove Cirrus CI FreeBSD job (#31380) - [#31390](https://github.com/numpy/numpy/pull/31390): BUILD: newer MKL uses so.3 - [#31391](https://github.com/numpy/numpy/pull/31391): BLD/MAINT: improve support for Intel LLVM compilers - [#31401](https://github.com/numpy/numpy/pull/31401): BUG: Avoid UB in [safe]()\[add,sub,mul\] helpers (#31396) - [#31402](https://github.com/numpy/numpy/pull/31402): BUG: exclude \_\_pycache\_\_ directories from wheels (#31397) - [#31404](https://github.com/numpy/numpy/pull/31404): TYP: `_NestedSequence` type parameter default to work around\... - [#31426](https://github.com/numpy/numpy/pull/31426): TYP: Fix `DTypeLike` runtime type-checker support (#31425) ### v2.4.4 — 2.4.4 (Mar 29, 2026) - Date: 2026-03-29 - Version: v2.4.4 - Original notes: https://github.com/numpy/numpy/releases/tag/v2.4.4 - Permalink: https://whatsnew.fyi/product/numpy/releases/v2.4.4 #### 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](https://github.com/numpy/numpy/pull/30978): MAINT: Prepare 2.4.x for further development - [#31049](https://github.com/numpy/numpy/pull/31049): BUG: Add test to reproduce problem described in #30816 (#30818) - [#31052](https://github.com/numpy/numpy/pull/31052): BUG: fix FNV-1a 64-bit selection by using NPY_SIZEOF_UINTP (#31035) - [#31053](https://github.com/numpy/numpy/pull/31053): BUG: avoid warning on ufunc with where=True and no output - [#31058](https://github.com/numpy/numpy/pull/31058): DOC: document caveats of ndarray.resize on 3.14 and newer - [#31079](https://github.com/numpy/numpy/pull/31079): TST: fix POWER VSX feature mapping (#30801) - [#31084](https://github.com/numpy/numpy/pull/31084): MAINT: numpy.i: Replace deprecated `sprintf` with `snprintf`\... ### v2.4.3 — 2.4.3 (Mar 9, 2026) - Date: 2026-03-09 - Version: v2.4.3 - Original notes: https://github.com/numpy/numpy/releases/tag/v2.4.3 - Permalink: https://whatsnew.fyi/product/numpy/releases/v2.4.3 #### NumPy 2.4.3 Release Notes The NumPy 2.4.3 is a patch release that fixes bugs discovered after the 2.4.2 release. The most user visible fix may be a threading fix for OpenBLAS on ARM, closing issue #30816. This release supports Python versions 3.11-3.14 ##### Contributors A total of 11 people contributed to this release. People with a \"+\" by their names contributed a patch for the first time. - Antareep Sarkar + - Charles Harris - Joren Hammudoglu - Matthieu Darbois - Matti Picus - Nathan Goldbaum - Peter Hawkins - Pieter Eendebak - Sebastian Berg - Warren Weckesser - stratakis + ##### Pull requests merged A total of 14 pull requests were merged for this release. - [#30759](https://github.com/numpy/numpy/pull/30759): MAINT: Prepare 2.4.x for further development - [#30827](https://github.com/numpy/numpy/pull/30827): BUG: Fix some leaks found via LeakSanitizer (#30756) - [#30841](https://github.com/numpy/numpy/pull/30841): MAINT: Synchronize 2.4.x submodules with main - [#30849](https://github.com/numpy/numpy/pull/30849): TYP: `matlib`: missing extended precision imports - [#30850](https://github.com/numpy/numpy/pull/30850): BUG: Fix weak hash function in np.isin(). (#30840) - [#30921](https://github.com/numpy/numpy/pull/30921): BUG: fix infinite recursion in np.ma.flatten_structured_array\... - [#30922](https://github.com/numpy/numpy/pull/30922): BUG: Fix buffer overrun in CPU baseline validation (#30877) - [#30923](https://github.com/numpy/numpy/pull/30923): BUG: Fix busdaycalendar\'s handling of a bool array weekmask\.... - [#30924](https://github.com/numpy/numpy/pull/30924): BUG: Fix reference leaks and NULL pointer dereferences (#30908) - [#30925](https://github.com/numpy/numpy/pull/30925): MAINT: fix two minor issues noticed when touching the C API setup - [#30955](https://github.com/numpy/numpy/pull/30955): ENH: Test .kind not .char in np.testing.assert_equal (#30879) - [#30957](https://github.com/numpy/numpy/pull/30957): BUG: fix type issues in uses if PyDataType macros - [#30958](https://github.com/numpy/numpy/pull/30958): MAINT: Don\'t use vulture 2.15, it has false positives - [#30973](https://github.com/numpy/numpy/pull/30973): MAINT: update openblas (#30961) ### v2.4.2 — 2.4.2 (Feb 1, 2026) - Date: 2026-02-01 - Version: v2.4.2 - Original notes: https://github.com/numpy/numpy/releases/tag/v2.4.2 - Permalink: https://whatsnew.fyi/product/numpy/releases/v2.4.2 #### NumPy 2.4.2 Release Notes The NumPy 2.4.2 is a patch release that fixes bugs discovered after the 2.4.1 release. Highlights are: - Fixes memory leaks - Updates OpenBLAS to fix hangs This release supports Python versions 3.11-3.14 ##### 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 - Daniel Tang + - Joren Hammudoglu - Kumar Aditya - Matti Picus - Nathan Goldbaum - Ralf Gommers - Sebastian Berg - Vikram Kumar + ##### Pull requests merged A total of 12 pull requests were merged for this release. - [#30629](https://github.com/numpy/numpy/pull/30629): MAINT: Prepare 2.4.x for further development - [#30636](https://github.com/numpy/numpy/pull/30636): TYP: `arange`: accept datetime strings - [#30657](https://github.com/numpy/numpy/pull/30657): MAINT: avoid possible race condition by not touching `os.environ`\... - [#30700](https://github.com/numpy/numpy/pull/30700): BUG: validate contraction axes in tensordot (#30521) - [#30701](https://github.com/numpy/numpy/pull/30701): DOC: \_\_array_namespace\_\_info\_\_: set_module not \_\_module\_\_ (#30679) - [#30702](https://github.com/numpy/numpy/pull/30702): BUG: fix free-threaded PyObject layout in replace_scalar_type_names\... - [#30703](https://github.com/numpy/numpy/pull/30703): TST: fix limited API example in tests for latest Cython - [#30709](https://github.com/numpy/numpy/pull/30709): BUG: Fix some bugs found via valgrind (#30680) - [#30712](https://github.com/numpy/numpy/pull/30712): MAINT: replace ob_type access with Py_TYPE in PyArray_CheckExact - [#30713](https://github.com/numpy/numpy/pull/30713): BUG: Fixup the quantile promotion fixup - [#30736](https://github.com/numpy/numpy/pull/30736): BUG: fix thread safety of `array_getbuffer` (#30667) - [#30737](https://github.com/numpy/numpy/pull/30737): backport scipy-openblas version change ### v2.4.1 — 2.4.1 (Jan 10, 2026) - Date: 2026-01-10 - Version: v2.4.1 - Original notes: https://github.com/numpy/numpy/releases/tag/v2.4.1 - Permalink: https://whatsnew.fyi/product/numpy/releases/v2.4.1 #### NumPy 2.4.1 Release Notes The NumPy 2.4.1 is a patch release that fixes bugs discoved after the 2.4.0 release. In particular, the typo `SeedlessSequence` is preserved to enable wheels using the random Cython API and built against NumPy \< 2.4.0 to run without errors. This release supports Python versions 3.11-3.14 ##### Contributors A total of 9 people contributed to this release. People with a \"+\" by their names contributed a patch for the first time. - Alexander Shadchin - Bill Tompkins + - Charles Harris - Joren Hammudoglu - Marten van Kerkwijk - Nathan Goldbaum - Raghuveer Devulapalli - Ralf Gommers - Sebastian Berg ##### Pull requests merged A total of 15 pull requests were merged for this release. - [#30490](https://github.com/numpy/numpy/pull/30490): MAINT: Prepare 2.4.x for further development - [#30503](https://github.com/numpy/numpy/pull/30503): DOC: `numpy.select`: fix `default` parameter docstring\... - [#30504](https://github.com/numpy/numpy/pull/30504): REV: Revert part of #30164 (#30500) - [#30506](https://github.com/numpy/numpy/pull/30506): TYP: `numpy.select`: allow passing array-like `default`\... - [#30507](https://github.com/numpy/numpy/pull/30507): MNT: use if constexpr for compile-time branch selection - [#30513](https://github.com/numpy/numpy/pull/30513): BUG: Fix leak in flat assignment iterator - [#30516](https://github.com/numpy/numpy/pull/30516): BUG: fix heap overflow in fixed-width string multiply (#30511) - [#30523](https://github.com/numpy/numpy/pull/30523): BUG: Ensure summed weights returned by np.average always are\... - [#30527](https://github.com/numpy/numpy/pull/30527): TYP: Fix return type of histogram2d - [#30594](https://github.com/numpy/numpy/pull/30594): MAINT: avoid passing ints to random functions that take double\... - [#30595](https://github.com/numpy/numpy/pull/30595): BLD: Avoiding conflict with pygit2 for static build - [#30596](https://github.com/numpy/numpy/pull/30596): MAINT: Fix msvccompiler missing error on FreeBSD - [#30608](https://github.com/numpy/numpy/pull/30608): BLD: update vendored Meson to 1.9.2 - [#30620](https://github.com/numpy/numpy/pull/30620): ENH: use more fine-grained critical sections in array coercion\... - [#30623](https://github.com/numpy/numpy/pull/30623): BUG: Undo result type change of quantile/percentile but keep\... ### v2.4.0 — 2.4.0 (Dec 20, 2025) - Date: 2025-12-20 - Version: v2.4.0 - Original notes: https://github.com/numpy/numpy/releases/tag/v2.4.0 - Permalink: https://whatsnew.fyi/product/numpy/releases/v2.4.0 #### NumPy 2.4.0 Release Notes The NumPy 2.4.0 release continues the work to improve free threaded Python support, user dtypes implementation, and annotations. There are many expired deprecations and bug fixes as well. This release supports Python versions 3.11-3.14 ##### Highlights Apart from annotations and `same_value` kwarg, the 2.4 highlights are mostly of interest to downstream developers. They should help in implementing new user dtypes. - Many annotation improvements. In particular, runtime signature introspection. - New `casting` kwarg `'same_value'` for casting by value. - New `PyUFunc_AddLoopsFromSpec` function that can be used to add user sort loops using the `ArrayMethod` API. - New `__numpy_dtype__` protocol. ##### Deprecations ###### Setting the `strides` attribute is deprecated Setting the strides attribute is now deprecated since mutating an array is unsafe if an array is shared, especially by multiple threads. As an alternative, you can create a new view (no copy) via: - `np.lib.stride_tricks.strided_window_view` if applicable, - `np.lib.stride_tricks.as_strided` for the general case, - or the `np.ndarray` constructor (`buffer` is the original array) for a light-weight version. ([gh-28925](https://github.com/numpy/numpy/pull/28925)) ###### Positional `out` argument to `np.maximum`, `np.minimum` is deprecated Passing the output array `out` positionally to `numpy.maximum` and `numpy.minimum` is deprecated. For example, `np.maximum(a, b, c)` will emit a deprecation warning, since `c` is treated as the output buffer rather than a third input. Always pass the output with the keyword form, e.g. `np.maximum(a, b, out=c)`. This makes intent clear and simplifies type annotations. ([gh-29052](https://github.com/numpy/numpy/pull/29052)) ###### `align=` must be passed as boolean to `np.dtype()` When creating a new `dtype` a `VisibleDeprecationWarning` will be given if `align=` is not a boolean. This is mainly to prevent accidentally passing a subarray align flag where it has no effect, such as `np.dtype("f8", 3)` instead of `np.dtype(("f8", 3))`. We strongly suggest to always pass `align=` as a keyword argument. ([gh-29301](https://github.com/numpy/numpy/pull/29301)) ###### Assertion and warning control utilities are deprecated `np.testing.assert_warns` and `np.testing.suppress_warnings` are deprecated. Use `warnings.catch_warnings`, `warnings.filterwarnings`, `pytest.warns`, or `pytest.filterwarnings` instead. ([gh-29550](https://github.com/numpy/numpy/pull/29550)) ###### `np.fix` is pending deprecation The `numpy.fix` function will be deprecated in a future release. It is recommended to use `numpy.trunc` instead, as it provides the same functionality of truncating decimal values to their integer parts. Static type checkers might already report a warning for the use of `numpy.fix`. ([gh-30168](https://github.com/numpy/numpy/pull/30168)) ###### in-place modification of `ndarray.shape` is pending deprecation Setting the `ndarray.shape` attribute directly will be deprecated in a future release. Instead of modifying the shape in place, it is recommended to use the `numpy.reshape` function. Static type checkers might already report a warning for assignments to `ndarray.shape`. ([gh-30282](https://github.com/numpy/numpy/pull/30282)) ###### Deprecation of `numpy.lib.user_array.container` The `numpy.lib.user_array.container` class is deprecated and will be removed in a future version. ([gh-30284](https://github.com/numpy/numpy/pull/30284)) ##### Expired deprecations ###### Removed deprecated `MachAr` runtime discovery mechanism. ([gh-29836](https://github.com/numpy/numpy/pull/29836)) ###### Raise `TypeError` on attempt to convert array with `ndim > 0` to scalar Conversion of an array with `ndim > 0` to a scalar was deprecated in NumPy 1.25. Now, attempting to do so raises `TypeError`. Ensure y _[Truncated at 4000 characters — full notes: https://github.com/numpy/numpy/releases/tag/v2.4.0]_