|
4 | 4 | NumPy 2.5.4 Release Notes |
5 | 5 | ========================= |
6 | 6 |
|
7 | | -The NumPy 2.5.4 is a patch release that fixes bugs discovered after the 2.5.3 |
8 | | -release. |
| 7 | +*Released on 2026-10-10.* |
9 | 8 |
|
10 | | -This release supports Python versions 3.12-3.15 |
| 9 | +NumPy 2.5.4 is a patch release that fixes bugs discovered after the 2.5.3 |
| 10 | +release. Highlights are: |
| 11 | + |
| 12 | +- Many typing fixes and improvements, |
| 13 | +- A workaround for the MSVC 19.51 bug, see below. |
| 14 | + |
| 15 | +This release supports Python versions 3.12-3.15. |
| 16 | + |
| 17 | + |
| 18 | +Improvements |
| 19 | +============ |
| 20 | + |
| 21 | +- ``numpy.linalg.svd`` and ``numpy.linalg.lstsq`` now raise for inputs containing |
| 22 | + infinities instead of returning garbage results. |
| 23 | +- Fixed hangs in ``numpy.linalg.svd`` and ``numpy.linalg.lstsq`` for certain inputs |
| 24 | + containing infinities for recent versions of some LAPACK implementations. |
| 25 | +- ``numpy.linalg.cond`` now handles non-finite inputs more consistently. |
| 26 | + |
| 27 | + (`gh-32593 <https://github.com/numpy/numpy/pull/32593>`__) |
| 28 | + |
| 29 | +StringDType hashing with NaN sentinels |
| 30 | +-------------------------------------- |
| 31 | +``StringDType`` instances with equivalent floating-point NaN sentinels now |
| 32 | +have equal hashes. Previously, distinct NaN objects could produce equal |
| 33 | +dtype instances with different hashes, causing dictionary lookups and set |
| 34 | +deduplication to fail. |
| 35 | + |
| 36 | +(`gh-32563 <https://github.com/numpy/numpy/pull/32563>`__) |
| 37 | + |
| 38 | + |
| 39 | +Changes |
| 40 | +======= |
| 41 | + |
| 42 | +``MaskedArray`` resets a fill_value that cannot be represented in a new dtype |
| 43 | +----------------------------------------------------------------------------- |
| 44 | +A fill_value copied from a source array is now reset to the default fill_value |
| 45 | +for the new dtype when it cannot be represented in that dtype. Previously the |
| 46 | +copied value could be stale: ufuncs that change dtype left the result holding a |
| 47 | +fill_value typed for the old dtype, which raised a ``TypeError`` only when |
| 48 | +something later validated it (such as ``.view()``), and a floating point |
| 49 | +fill_value that overflows an integer dtype was kept as an out-of-range value |
| 50 | +together with a ``RuntimeWarning``. Both now fall back to the default, |
| 51 | +including when a masked array is passed to ``MaskedArray`` with a different |
| 52 | +``dtype``. A fill_value given explicitly by the user is still validated and |
| 53 | +raises as before. This can now raise a ``ComplexWarning`` if the fill_value is |
| 54 | +complex and the new dtype is real. |
| 55 | + |
| 56 | +(`gh-32508 <https://github.com/numpy/numpy/pull/32508>`__) |
| 57 | +(`gh-32562 <https://github.com/numpy/numpy/pull/32562>`__) |
| 58 | + |
| 59 | + |
| 60 | +Contributors |
| 61 | +============ |
| 62 | + |
| 63 | +A total of 9 people contributed to this release. People with a "+" by their |
| 64 | +names contributed a patch for the first time. |
| 65 | + |
| 66 | +* Aniket Singh Yadav |
| 67 | +* Bhuvansh Kataria + |
| 68 | +* Charles Harris |
| 69 | +* Iason Krommydas |
| 70 | +* Joren Hammudoglu |
| 71 | +* Lazizbek Ergashev + |
| 72 | +* Nathan Goldbaum |
| 73 | +* Sebastian Berg |
| 74 | +* Yeonho Kim |
| 75 | + |
| 76 | + |
| 77 | +Pull requests merged |
| 78 | +==================== |
| 79 | + |
| 80 | +A total of 17 pull requests were merged for this release. |
| 81 | + |
| 82 | +* `#32520 <https://github.com/numpy/numpy/pull/32520>`__: MAINT: Prepare 2.5.x for further development |
| 83 | +* `#32557 <https://github.com/numpy/numpy/pull/32557>`__: BUG: Reset an unrepresentable fill_value on a dtype change (#32508) |
| 84 | +* `#32565 <https://github.com/numpy/numpy/pull/32565>`__: BLD: work around MSVC 19.51 bug (#32561) |
| 85 | +* `#32600 <https://github.com/numpy/numpy/pull/32600>`__: BUG: fix np.strings.replace truncating old/new to a's |
| 86 | +* `#32707 <https://github.com/numpy/numpy/pull/32707>`__: BUG: fix _ureduce reshape when a kept axis has size 0 (#32536) |
| 87 | +* `#32709 <https://github.com/numpy/numpy/pull/32709>`__: BUG: fix two possible crashes in the ufunc.accumulate implementation... |
| 88 | +* `#32710 <https://github.com/numpy/numpy/pull/32710>`__: BUG: Reset an inherited fill_value in MaskedArray.__new__ as... |
| 89 | +* `#32711 <https://github.com/numpy/numpy/pull/32711>`__: ENH: Improvements and fixes for stringdtype hashing (#32563) |
| 90 | +* `#32713 <https://github.com/numpy/numpy/pull/32713>`__: CI: increase ppc64le timeout to match other timeouts (#32583) |
| 91 | +* `#32718 <https://github.com/numpy/numpy/pull/32718>`__: BUG: fix memory leak in legacy ArrayMethod wrapper code |
| 92 | +* `#32719 <https://github.com/numpy/numpy/pull/32719>`__: BUG: check for non-finite input before calling gesdd/gelsd and... |
| 93 | +* `#32738 <https://github.com/numpy/numpy/pull/32738>`__: BUG: fix segfault in as_arrays() on self-referencing pyscalars |
| 94 | +* `#32741 <https://github.com/numpy/numpy/pull/32741>`__: TYP: Various typing improvements. |
| 95 | +* `#32791 <https://github.com/numpy/numpy/pull/32791>`__: BUG: Fix canonicalization/promotion of nested subarray types... |
| 96 | +* `#32888 <https://github.com/numpy/numpy/pull/32888>`__: MAINT: Update vendored-meson to match main. |
| 97 | +* `#32904 <https://github.com/numpy/numpy/pull/32904>`__: TYP: Backport a number of typing updates. |
| 98 | +* `#32956 <https://github.com/numpy/numpy/pull/32956>`__: TYP: Various typing fixes and improvements. |
11 | 99 |
|
0 commit comments