numpy

The fundamental package for scientific computing with Python.

OTHER License

Downloads
343M
Stars
26.2K
Committers
1.8K

Bot releases are hidden (Show)

numpy - 2.1.0 (Aug 18, 2024) Latest Release

Published by charris 2 months ago

NumPy 2.1.0 Release Notes

NumPy 2.1.0 provides support for the upcoming Python 3.13 release and
drops support for Python 3.9. In addition to the usual bug fixes and
updated Python support, it helps get us back into our usual release
cycle after the extended development of 2.0. The highlights for this
release are:

  • Support for the array-api 2023.12 standard.
  • Support for Python 3.13.
  • Preliminary support for free threaded Python 3.13.

Python versions 3.10-3.13 are supported in this release.

New functions

New function numpy.unstack

A new function np.unstack(array, axis=...) was added, which splits an
array into a tuple of arrays along an axis. It serves as the inverse of
[numpy.stack]{.title-ref}.

(gh-26579)

Deprecations

  • The fix_imports keyword argument in numpy.save is deprecated.
    Since NumPy 1.17, numpy.save uses a pickle protocol that no longer
    supports Python 2, and ignored fix_imports keyword. This keyword
    is kept only for backward compatibility. It is now deprecated.

    (gh-26452)

  • Passing non-integer inputs as the first argument of
    [bincount]{.title-ref} is now deprecated, because such inputs are
    silently cast to integers with no warning about loss of precision.

    (gh-27076)

Expired deprecations

  • Scalars and 0D arrays are disallowed for numpy.nonzero and
    numpy.ndarray.nonzero.

    (gh-26268)

  • set_string_function internal function was removed and
    PyArray_SetStringFunction was stubbed out.

    (gh-26611)

C API changes

API symbols now hidden but customizable

NumPy now defaults to hide the API symbols it adds to allow all NumPy
API usage. This means that by default you cannot dynamically fetch the
NumPy API from another library (this was never possible on windows).

If you are experiencing linking errors related to PyArray_API or
PyArray_RUNTIME_VERSION, you can define the NPY_API_SYMBOL_ATTRIBUTE
to opt-out of this change.

If you are experiencing problems due to an upstream header including
NumPy, the solution is to make sure you
#include "numpy/ndarrayobject.h" before their header and import NumPy
yourself based on including-the-c-api.

(gh-26103)

Many shims removed from npy_3kcompat.h

Many of the old shims and helper functions were removed from
npy_3kcompat.h. If you find yourself in need of these, vendor the
previous version of the file into your codebase.

(gh-26842)

New PyUFuncObject field process_core_dims_func

The field process_core_dims_func was added to the structure
PyUFuncObject. For generalized ufuncs, this field can be set to a
function of type PyUFunc_ProcessCoreDimsFunc that will be called when
the ufunc is called. It allows the ufunc author to check that core
dimensions satisfy additional constraints, and to set output core
dimension sizes if they have not been provided.

(gh-26908)

New Features

Preliminary Support for Free-Threaded CPython 3.13

CPython 3.13 will be available as an experimental free-threaded build.
See https://py-free-threading.github.io, PEP 703 and the
CPython 3.13 release notes for more detail about free-threaded Python.

NumPy 2.1 has preliminary support for the free-threaded build of CPython
3.13. This support was enabled by fixing a number of C thread-safety
issues in NumPy. Before NumPy 2.1, NumPy used a large number of C global
static variables to store runtime caches and other state. We have either
refactored to avoid the need for global state, converted the global
state to thread-local state, or added locking.

Support for free-threaded Python does not mean that NumPy is thread
safe. Read-only shared access to ndarray should be safe. NumPy exposes
shared mutable state and we have not added any locking to the array
object itself to serialize access to shared state. Care must be taken in
user code to avoid races if you would like to mutate the same array in
multiple threads. It is certainly possible to crash NumPy by mutating an
array simultaneously in multiple threads, for example by calling a ufunc
and the resize method simultaneously. For now our guidance is:
"don't do that". In the future we would like to provide stronger
guarantees.

Object arrays in particular need special care, since the GIL previously
provided locking for object array access and no longer does. See
Issue #27199 for more information about object
arrays in the free-threaded build.

If you are interested in free-threaded Python, for example because you
have a multiprocessing-based workflow that you are interested in running
with Python threads, we encourage testing and experimentation.

If you run into problems that you suspect are because of NumPy, please
open an issue,
checking first if the bug also occurs in the "regular" non-free-threaded CPython 3.13
build. Many threading bugs can also occur in code that releases
the GIL; disabling the GIL only makes it easier to hit threading bugs.

(gh-26157)

f2py can generate freethreading-compatible C extensions

Pass --freethreading-compatible to the f2py CLI tool to produce a C
extension marked as compatible with the free threading CPython
interpreter. Doing so prevents the interpreter from re-enabling the GIL
at runtime when it imports the C extension. Note that f2py does not
analyze fortran code for thread safety, so you must verify that the
wrapped fortran code is thread safe before marking the extension as
compatible.

(gh-26981)

  • numpy.reshape and numpy.ndarray.reshape now support shape and
    copy arguments.

    (gh-26292)

  • NumPy now supports DLPack v1, support for older versions will be
    deprecated in the future.

    (gh-26501)

  • numpy.asanyarray now supports copy and device arguments,
    matching numpy.asarray.

    (gh-26580)

  • numpy.printoptions, numpy.get_printoptions, and
    numpy.set_printoptions now support a new option, override_repr,
    for defining custom repr(array) behavior.

    (gh-26611)

  • numpy.cumulative_sum and numpy.cumulative_prod were added as
    Array API compatible alternatives for numpy.cumsum and
    numpy.cumprod. The new functions can include a fixed initial
    (zeros for sum and ones for prod) in the result.

    (gh-26724)

  • numpy.clip now supports max and min keyword arguments which
    are meant to replace a_min and a_max. Also, for np.clip(a) or
    np.clip(a, None, None) a copy of the input array will be returned
    instead of raising an error.

    (gh-26724)

  • numpy.astype now supports device argument.

    (gh-26724)

Improvements

histogram auto-binning now returns bin sizes >=1 for integer input data

For integer input data, bin sizes smaller than 1 result in spurious
empty bins. This is now avoided when the number of bins is computed
using one of the algorithms provided by histogram_bin_edges.

(gh-12150)

ndarray shape-type parameter is now covariant and bound to tuple[int, ...]

Static typing for ndarray is a long-term effort that continues with
this change. It is a generic type with type parameters for the shape and
the data type. Previously, the shape type parameter could be any value.
This change restricts it to a tuple of ints, as one would expect from
using ndarray.shape. Further, the shape-type parameter has been
changed from invariant to covariant. This change also applies to the
subtypes of ndarray, e.g. numpy.ma.MaskedArray. See the
typing docs
for more information.

(gh-26081)

np.quantile with method closest_observation chooses nearest even order statistic

This changes the definition of nearest for border cases from the nearest
odd order statistic to nearest even order statistic. The numpy
implementation now matches other reference implementations.

(gh-26656)

lapack_lite is now thread safe

NumPy provides a minimal low-performance version of LAPACK named
lapack_lite that can be used if no BLAS/LAPACK system is detected at
build time.

Until now, lapack_lite was not thread safe. Single-threaded use cases
did not hit any issues, but running linear algebra operations in
multiple threads could lead to errors, incorrect results, or segfaults
due to data races.

We have added a global lock, serializing access to lapack_lite in
multiple threads.

(gh-26750)

The numpy.printoptions context manager is now thread and async-safe

In prior versions of NumPy, the printoptions were defined using a
combination of Python and C global variables. We have refactored so the
state is stored in a python ContextVar, making the context manager
thread and async-safe.

(gh-26846)

Type hinting numpy.polynomial

Starting from the 2.1 release, PEP 484 type annotations have been
included for the functions and convenience classes in numpy.polynomial
and its sub-packages.

(gh-26897)

Improved numpy.dtypes type hints

The type annotations for numpy.dtypes are now a better reflection of
the runtime: The numpy.dtype type-aliases have been replaced with
specialized dtype subtypes, and the previously missing annotations
for numpy.dtypes.StringDType have been added.

(gh-27008)

Performance improvements and changes

  • numpy.save now uses pickle protocol version 4 for saving arrays
    with object dtype, which allows for pickle objects larger than 4GB
    and improves saving speed by about 5% for large arrays.

    (gh-26388)

  • OpenBLAS on x86_64 and i686 is built with fewer kernels. Based on
    benchmarking, there are 5 clusters of performance around these
    kernels: PRESCOTT NEHALEM SANDYBRIDGE HASWELL SKYLAKEX.

    (gh-27147)

  • OpenBLAS on windows is linked without quadmath, simplifying
    licensing

    (gh-27147)

  • Due to a regression in OpenBLAS on windows, the performance
    improvements when using multiple threads for OpenBLAS 0.3.26 were
    reverted.

    (gh-27147)

ma.cov and ma.corrcoef are now significantly faster

The private function has been refactored along with ma.cov and
ma.corrcoef. They are now significantly faster, particularly on large,
masked arrays.

(gh-26285)

Changes

  • As numpy.vecdot is now a ufunc it has a less precise signature.
    This is due to the limitations of ufunc's typing stub.

    (gh-26313)

  • numpy.floor, numpy.ceil, and numpy.trunc now won't perform
    casting to a floating dtype for integer and boolean dtype input
    arrays.

    (gh-26766)

ma.corrcoef may return a slightly different result

A pairwise observation approach is currently used in ma.corrcoef to
calculate the standard deviations for each pair of variables. This has
been changed as it is being used to normalise the covariance, estimated
using ma.cov, which does not consider the observations for each
variable in a pairwise manner, rendering it unnecessary. The
normalisation has been replaced by the more appropriate standard
deviation for each variable, which significantly reduces the wall time,
but will return slightly different estimates of the correlation
coefficients in cases where the observations between a pair of variables
are not aligned. However, it will return the same estimates in all other
cases, including returning the same correlation matrix as corrcoef
when using a masked array with no masked values.

(gh-26285)

Cast-safety fixes in copyto and full

copyto now uses NEP 50 correctly and applies this to its cast safety.
Python integer to NumPy integer casts and Python float to NumPy float
casts are now considered "safe" even if assignment may fail or
precision may be lost. This means the following examples change
slightly:

  • np.copyto(int8_arr, 1000) previously performed an unsafe/same-kind cast
    of the Python integer. It will now always raise, to achieve an
    unsafe cast you must pass an array or NumPy scalar.

  • np.copyto(uint8_arr, 1000, casting="safe") will raise an
    OverflowError rather than a TypeError due to same-kind casting.

  • np.copyto(float32_arr, 1e300, casting="safe") will overflow to
    inf (float32 cannot hold 1e300) rather raising a TypeError.

Further, only the dtype is used when assigning NumPy scalars (or 0-d
arrays), meaning that the following behaves differently:

  • np.copyto(float32_arr, np.float64(3.0), casting="safe") raises.
  • np.coptyo(int8_arr, np.int64(100), casting="safe") raises.
    Previously, NumPy checked whether the 100 fits the int8_arr.

This aligns copyto, full, and full_like with the correct NumPy 2
behavior.

(gh-27091)

Checksums

MD5

2323404663c0b2a86362319d7526eb80  numpy-2.1.0-cp310-cp310-macosx_10_9_x86_64.whl
3d4bca8d05eb1eba859e77ff8f91d843  numpy-2.1.0-cp310-cp310-macosx_11_0_arm64.whl
9bd065f147dbf3f2d59ab57bff4f0074  numpy-2.1.0-cp310-cp310-macosx_14_0_arm64.whl
47d177533511901cd6bf77f72cbd3d6e  numpy-2.1.0-cp310-cp310-macosx_14_0_x86_64.whl
530b7f38f64216f1322b39bc50f36c0c  numpy-2.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
d2a3161a10811a675a29a63e25636d83  numpy-2.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
4e9fb20b080f7931791da71708740b83  numpy-2.1.0-cp310-cp310-musllinux_1_1_x86_64.whl
776eb610795d63217980a36eb23bf268  numpy-2.1.0-cp310-cp310-musllinux_1_2_aarch64.whl
8328b9e2afa4013aaf3e4963349445e2  numpy-2.1.0-cp310-cp310-win32.whl
e3184b9979192c8d7b80deb2af16d6bb  numpy-2.1.0-cp310-cp310-win_amd64.whl
54571aef9d9081e35bebef10f8d64e75  numpy-2.1.0-cp311-cp311-macosx_10_9_x86_64.whl
841dac2386c1da870a384b64cd31e32b  numpy-2.1.0-cp311-cp311-macosx_14_0_arm64.whl
0fe85239ebe336d2baaddcb0ed001dc7  numpy-2.1.0-cp311-cp311-macosx_14_0_x86_64.whl
772a55a6c46f7b643af4640c2ca68d70  numpy-2.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
64fefbc527229521cf2a516b778b8aa7  numpy-2.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
5cdb3d262d8c513b0f08cd1b6ba48512  numpy-2.1.0-cp311-cp311-musllinux_1_1_x86_64.whl
16140f5de42e87d84b80c350fd014893  numpy-2.1.0-cp311-cp311-musllinux_1_2_aarch64.whl
5e37df534d167af1966e099e0be9d94a  numpy-2.1.0-cp311-cp311-win32.whl
ee443aa000621bed8bb2d6a94afd89b5  numpy-2.1.0-cp311-cp311-win_amd64.whl
d8c911fc34a8dad4ed821036563b5758  numpy-2.1.0-cp312-cp312-macosx_10_9_x86_64.whl
ec25d637c43ae8229052e62a4f40f2d2  numpy-2.1.0-cp312-cp312-macosx_11_0_arm64.whl
67c7abca3d0339f17a8543abc0e7bf11  numpy-2.1.0-cp312-cp312-macosx_14_0_arm64.whl
0d36ec6a64cbef1d727eb608a236ad2c  numpy-2.1.0-cp312-cp312-macosx_14_0_x86_64.whl
0eedab574a3b75ec237be910e9717153  numpy-2.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
73dd2a5d0c85007bf5fdb4b7f66b8451  numpy-2.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
94fb0cfbc647a34177c766570fad752b  numpy-2.1.0-cp312-cp312-musllinux_1_1_x86_64.whl
de3efbbcd792a1f82d0e3e175ea02ca9  numpy-2.1.0-cp312-cp312-musllinux_1_2_aarch64.whl
9a63ebbfb3c4c6eba77ef0723a5dc86f  numpy-2.1.0-cp312-cp312-win32.whl
c68bc27545ac68c54935a1d0278b18f6  numpy-2.1.0-cp312-cp312-win_amd64.whl
f2795bb974af42e2723e32af9b14b66d  numpy-2.1.0-cp313-cp313-macosx_10_13_x86_64.whl
2f7426b06a332ea7a20159f3c06d67d1  numpy-2.1.0-cp313-cp313-macosx_11_0_arm64.whl
fcef18e031fc8588227023bac55d9636  numpy-2.1.0-cp313-cp313-macosx_14_0_arm64.whl
cbb5ca4dc798ea397344c93a2549e73e  numpy-2.1.0-cp313-cp313-macosx_14_0_x86_64.whl
573213bea3a67452a310355adc7c6aa1  numpy-2.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
24f8c8a1235aeaedb8f154a984b3c78b  numpy-2.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
b2ef762c0ebb02b58a339c1e38f032b2  numpy-2.1.0-cp313-cp313-musllinux_1_1_x86_64.whl
50e68cbfeb330aff607969c30251632d  numpy-2.1.0-cp313-cp313-musllinux_1_2_aarch64.whl
21228342cd1b4ff8c7ec1aea45c07186  numpy-2.1.0-cp313-cp313-win32.whl
8d234b05f0c4faf7b9884a1f0f19c23d  numpy-2.1.0-cp313-cp313-win_amd64.whl
e0c19ca29fa8e8e051107cd36b978f05  numpy-2.1.0-cp313-cp313t-macosx_10_13_x86_64.whl
98756f2ff9adc2cf374c28db77e28312  numpy-2.1.0-cp313-cp313t-macosx_11_0_arm64.whl
69786349d1f392dc6ac3fe00271e941b  numpy-2.1.0-cp313-cp313t-macosx_14_0_arm64.whl
4d1481bcb17aaebfc785e005455da223  numpy-2.1.0-cp313-cp313t-macosx_14_0_x86_64.whl
1d403eda14369ab023d5ae1c15dce25c  numpy-2.1.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
cdeece2cd6508eeee5a4c3150b58ec59  numpy-2.1.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
85347b754d8324c508f7aeb7de243feb  numpy-2.1.0-cp313-cp313t-musllinux_1_1_x86_64.whl
6ff18d36d0940de6c1cc962a61b44bd5  numpy-2.1.0-cp313-cp313t-musllinux_1_2_aarch64.whl
2f7d60a99c236a8f909bd86b8ed1e3a4  numpy-2.1.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl
dc610133d9f09e5b3d396859e75c5593  numpy-2.1.0-pp310-pypy310_pp73-macosx_14_0_x86_64.whl
6a2883ee5b16ab5c031037cc63c20e9b  numpy-2.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
c914ba2fe3fcdcd04c8fe6a8374ea5fb  numpy-2.1.0-pp310-pypy310_pp73-win_amd64.whl
4cb2230ffa1cc41329ae29bd69ee08de  numpy-2.1.0.tar.gz

SHA256

6326ab99b52fafdcdeccf602d6286191a79fe2fda0ae90573c5814cd2b0bc1b8  numpy-2.1.0-cp310-cp310-macosx_10_9_x86_64.whl
0937e54c09f7a9a68da6889362ddd2ff584c02d015ec92672c099b61555f8911  numpy-2.1.0-cp310-cp310-macosx_11_0_arm64.whl
30014b234f07b5fec20f4146f69e13cfb1e33ee9a18a1879a0142fbb00d47673  numpy-2.1.0-cp310-cp310-macosx_14_0_arm64.whl
899da829b362ade41e1e7eccad2cf274035e1cb36ba73034946fccd4afd8606b  numpy-2.1.0-cp310-cp310-macosx_14_0_x86_64.whl
08801848a40aea24ce16c2ecde3b756f9ad756586fb2d13210939eb69b023f5b  numpy-2.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
398049e237d1aae53d82a416dade04defed1a47f87d18d5bd615b6e7d7e41d1f  numpy-2.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
0abb3916a35d9090088a748636b2c06dc9a6542f99cd476979fb156a18192b84  numpy-2.1.0-cp310-cp310-musllinux_1_1_x86_64.whl
10e2350aea18d04832319aac0f887d5fcec1b36abd485d14f173e3e900b83e33  numpy-2.1.0-cp310-cp310-musllinux_1_2_aarch64.whl
f6b26e6c3b98adb648243670fddc8cab6ae17473f9dc58c51574af3e64d61211  numpy-2.1.0-cp310-cp310-win32.whl
f505264735ee074250a9c78247ee8618292091d9d1fcc023290e9ac67e8f1afa  numpy-2.1.0-cp310-cp310-win_amd64.whl
76368c788ccb4f4782cf9c842b316140142b4cbf22ff8db82724e82fe1205dce  numpy-2.1.0-cp311-cp311-macosx_10_9_x86_64.whl
f8e93a01a35be08d31ae33021e5268f157a2d60ebd643cfc15de6ab8e4722eb1  numpy-2.1.0-cp311-cp311-macosx_14_0_arm64.whl
9523f8b46485db6939bd069b28b642fec86c30909cea90ef550373787f79530e  numpy-2.1.0-cp311-cp311-macosx_14_0_x86_64.whl
54139e0eb219f52f60656d163cbe67c31ede51d13236c950145473504fa208cb  numpy-2.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
f5ebbf9fbdabed208d4ecd2e1dfd2c0741af2f876e7ae522c2537d404ca895c3  numpy-2.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
378cb4f24c7d93066ee4103204f73ed046eb88f9ad5bb2275bb9fa0f6a02bd36  numpy-2.1.0-cp311-cp311-musllinux_1_1_x86_64.whl
d8f699a709120b220dfe173f79c73cb2a2cab2c0b88dd59d7b49407d032b8ebd  numpy-2.1.0-cp311-cp311-musllinux_1_2_aarch64.whl
ffbd6faeb190aaf2b5e9024bac9622d2ee549b7ec89ef3a9373fa35313d44e0e  numpy-2.1.0-cp311-cp311-win32.whl
0af3a5987f59d9c529c022c8c2a64805b339b7ef506509fba7d0556649b9714b  numpy-2.1.0-cp311-cp311-win_amd64.whl
fe76d75b345dc045acdbc006adcb197cc680754afd6c259de60d358d60c93736  numpy-2.1.0-cp312-cp312-macosx_10_9_x86_64.whl
f358ea9e47eb3c2d6eba121ab512dfff38a88db719c38d1e67349af210bc7529  numpy-2.1.0-cp312-cp312-macosx_11_0_arm64.whl
dd94ce596bda40a9618324547cfaaf6650b1a24f5390350142499aa4e34e53d1  numpy-2.1.0-cp312-cp312-macosx_14_0_arm64.whl
b47c551c6724960479cefd7353656498b86e7232429e3a41ab83be4da1b109e8  numpy-2.1.0-cp312-cp312-macosx_14_0_x86_64.whl
a0756a179afa766ad7cb6f036de622e8a8f16ffdd55aa31f296c870b5679d745  numpy-2.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
24003ba8ff22ea29a8c306e61d316ac74111cebf942afbf692df65509a05f111  numpy-2.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
b34fa5e3b5d6dc7e0a4243fa0f81367027cb6f4a7215a17852979634b5544ee0  numpy-2.1.0-cp312-cp312-musllinux_1_1_x86_64.whl
c4f982715e65036c34897eb598d64aef15150c447be2cfc6643ec7a11af06574  numpy-2.1.0-cp312-cp312-musllinux_1_2_aarch64.whl
c4cd94dfefbefec3f8b544f61286584292d740e6e9d4677769bc76b8f41deb02  numpy-2.1.0-cp312-cp312-win32.whl
a0cdef204199278f5c461a0bed6ed2e052998276e6d8ab2963d5b5c39a0500bc  numpy-2.1.0-cp312-cp312-win_amd64.whl
8ab81ccd753859ab89e67199b9da62c543850f819993761c1e94a75a814ed667  numpy-2.1.0-cp313-cp313-macosx_10_13_x86_64.whl
442596f01913656d579309edcd179a2a2f9977d9a14ff41d042475280fc7f34e  numpy-2.1.0-cp313-cp313-macosx_11_0_arm64.whl
848c6b5cad9898e4b9ef251b6f934fa34630371f2e916261070a4eb9092ffd33  numpy-2.1.0-cp313-cp313-macosx_14_0_arm64.whl
54c6a63e9d81efe64bfb7bcb0ec64332a87d0b87575f6009c8ba67ea6374770b  numpy-2.1.0-cp313-cp313-macosx_14_0_x86_64.whl
652e92fc409e278abdd61e9505649e3938f6d04ce7ef1953f2ec598a50e7c195  numpy-2.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
0ab32eb9170bf8ffcbb14f11613f4a0b108d3ffee0832457c5d4808233ba8977  numpy-2.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
8fb49a0ba4d8f41198ae2d52118b050fd34dace4b8f3fb0ee34e23eb4ae775b1  numpy-2.1.0-cp313-cp313-musllinux_1_1_x86_64.whl
44e44973262dc3ae79e9063a1284a73e09d01b894b534a769732ccd46c28cc62  numpy-2.1.0-cp313-cp313-musllinux_1_2_aarch64.whl
ab83adc099ec62e044b1fbb3a05499fa1e99f6d53a1dde102b2d85eff66ed324  numpy-2.1.0-cp313-cp313-win32.whl
de844aaa4815b78f6023832590d77da0e3b6805c644c33ce94a1e449f16d6ab5  numpy-2.1.0-cp313-cp313-win_amd64.whl
343e3e152bf5a087511cd325e3b7ecfd5b92d369e80e74c12cd87826e263ec06  numpy-2.1.0-cp313-cp313t-macosx_10_13_x86_64.whl
f07fa2f15dabe91259828ce7d71b5ca9e2eb7c8c26baa822c825ce43552f4883  numpy-2.1.0-cp313-cp313t-macosx_11_0_arm64.whl
5474dad8c86ee9ba9bb776f4b99ef2d41b3b8f4e0d199d4f7304728ed34d0300  numpy-2.1.0-cp313-cp313t-macosx_14_0_arm64.whl
1f817c71683fd1bb5cff1529a1d085a57f02ccd2ebc5cd2c566f9a01118e3b7d  numpy-2.1.0-cp313-cp313t-macosx_14_0_x86_64.whl
3a3336fbfa0d38d3deacd3fe7f3d07e13597f29c13abf4d15c3b6dc2291cbbdd  numpy-2.1.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
7a894c51fd8c4e834f00ac742abad73fc485df1062f1b875661a3c1e1fb1c2f6  numpy-2.1.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
9156ca1f79fc4acc226696e95bfcc2b486f165a6a59ebe22b2c1f82ab190384a  numpy-2.1.0-cp313-cp313t-musllinux_1_1_x86_64.whl
624884b572dff8ca8f60fab591413f077471de64e376b17d291b19f56504b2bb  numpy-2.1.0-cp313-cp313t-musllinux_1_2_aarch64.whl
15ef8b2177eeb7e37dd5ef4016f30b7659c57c2c0b57a779f1d537ff33a72c7b  numpy-2.1.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl
e5f0642cdf4636198a4990de7a71b693d824c56a757862230454629cf62e323d  numpy-2.1.0-pp310-pypy310_pp73-macosx_14_0_x86_64.whl
f15976718c004466406342789f31b6673776360f3b1e3c575f25302d7e789575  numpy-2.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
6c1de77ded79fef664d5098a66810d4d27ca0224e9051906e634b3f7ead134c2  numpy-2.1.0-pp310-pypy310_pp73-win_amd64.whl
7dc90da0081f7e1da49ec4e398ede6a8e9cc4f5ebe5f9e06b443ed889ee9aaa2  numpy-2.1.0.tar.gz
numpy - 2.1.0rc1 (Aug 11, 2024)

Published by charris 2 months ago

NumPy 2.1.0 Release Notes

NumPy 2.1.0 provides support for the upcoming Python 3.13 release and
drops support for Python 3.9. In addition to the usual bug fixes and
updated Python support, it helps get us back into our usual release
cycle after the extended development of 2.0. The highlights for this
release are:

  • Support for the array-api 2023.12 standard.
  • Support for Python 3.13.
  • Preliminary support for free threaded Python 3.13.

Python versions 3.10-3.13 are supported in this release.

New functions

New function numpy.unstack

A new function np.unstack(array, axis=...) was added, which splits an
array into a tuple of arrays along an axis. It serves as the inverse of
[numpy.stack]{.title-ref}.

(gh-26579)

Deprecations

  • The fix_imports keyword argument in numpy.save is deprecated.
    Since NumPy 1.17, numpy.save uses a pickle protocol that no longer
    supports Python 2, and ignored fix_imports keyword. This keyword
    is kept only for backward compatibility. It is now deprecated.

    (gh-26452)

  • Passing non-integer inputs as the first argument of
    [bincount]{.title-ref} is now deprecated, because such inputs are
    silently cast to integers with no warning about loss of precision.

    (gh-27076)

Expired deprecations

  • Scalars and 0D arrays are disallowed for numpy.nonzero and
    numpy.ndarray.nonzero.

    (gh-26268)

  • set_string_function internal function was removed and
    PyArray_SetStringFunction was stubbed out.

    (gh-26611)

C API changes

API symbols now hidden but customizable

NumPy now defaults to hide the API symbols it adds to allow all NumPy
API usage. This means that by default you cannot dynamically fetch the
NumPy API from another library (this was never possible on windows).

If you are experiencing linking errors related to PyArray_API or
PyArray_RUNTIME_VERSION, you can define the NPY_API_SYMBOL_ATTRIBUTE
to opt-out of this change.

If you are experiencing problems due to an upstream header including
NumPy, the solution is to make sure you
#include "numpy/ndarrayobject.h" before their header and import NumPy
yourself based on including-the-c-api.

(gh-26103)

Many shims removed from npy_3kcompat.h

Many of the old shims and helper functions were removed from
npy_3kcompat.h. If you find yourself in need of these, vendor the
previous version of the file into your codebase.

(gh-26842)

New PyUFuncObject field process_core_dims_func

The field process_core_dims_func was added to the structure
PyUFuncObject. For generalized ufuncs, this field can be set to a
function of type PyUFunc_ProcessCoreDimsFunc that will be called when
the ufunc is called. It allows the ufunc author to check that core
dimensions satisfy additional constraints, and to set output core
dimension sizes if they have not been provided.

(gh-26908)

New Features

  • numpy.reshape and numpy.ndarray.reshape now support shape and
    copy arguments.

    (gh-26292)

  • NumPy now supports DLPack v1, support for older versions will be
    deprecated in the future.

    (gh-26501)

  • numpy.asanyarray now supports copy and device arguments,
    matching numpy.asarray.

    (gh-26580)

  • numpy.printoptions, numpy.get_printoptions, and
    numpy.set_printoptions now support a new option, override_repr,
    for defining custom repr(array) behavior.

    (gh-26611)

  • numpy.cumulative_sum and numpy.cumulative_prod were added as
    Array API compatible alternatives for numpy.cumsum and
    numpy.cumprod. The new functions can include a fixed initial
    (zeros for sum and ones for prod) in the result.

    (gh-26724)

  • numpy.clip now supports max and min keyword arguments which
    are meant to replace a_min and a_max. Also, for np.clip(a) or
    np.clip(a, None, None) a copy of the input array will be returned
    instead of raising an error.

    (gh-26724)

  • numpy.astype now supports device argument.

    (gh-26724)

f2py can generate freethreading-compatible C extensions

Pass --freethreading-compatible to the f2py CLI tool to produce a C
extension marked as compatible with the free threading CPython
interpreter. Doing so prevents the interpreter from re-enabling the GIL
at runtime when it imports the C extension. Note that f2py does not
analyze fortran code for thread safety, so you must verify that the
wrapped fortran code is thread safe before marking the extension as
compatible.

(gh-26981)

Improvements

histogram auto-binning now returns bin sizes >=1 for integer input data

For integer input data, bin sizes smaller than 1 result in spurious
empty bins. This is now avoided when the number of bins is computed
using one of the algorithms provided by histogram_bin_edges.

(gh-12150)

ndarray shape-type parameter is now covariant and bound to tuple[int, ...]

Static typing for ndarray is a long-term effort that continues with
this change. It is a generic type with type parameters for the shape and
the data type. Previously, the shape type parameter could be any value.
This change restricts it to a tuple of ints, as one would expect from
using ndarray.shape. Further, the shape-type parameter has been
changed from invariant to covariant. This change also applies to the
subtypes of ndarray, e.g. numpy.ma.MaskedArray. See the typing
docs

for more information.

(gh-26081)

np.quantile with method closest_observation chooses nearest even order statistic

This changes the definition of nearest for border cases from the nearest
odd order statistic to nearest even order statistic. The numpy
implementation now matches other reference implementations.

(gh-26656)

lapack_lite is now thread safe

NumPy provides a minimal low-performance version of LAPACK named
lapack_lite that can be used if no BLAS/LAPACK system is detected at
build time.

Until now, lapack_lite was not thread safe. Single-threaded use cases
did not hit any issues, but running linear algebra operations in
multiple threads could lead to errors, incorrect results, or segfaults
due to data races.

We have added a global lock, serializing access to lapack_lite in
multiple threads.

(gh-26750)

The numpy.printoptions context manager is now thread and async-safe

In prior versions of NumPy, the printoptions were defined using a
combination of Python and C global variables. We have refactored so the
state is stored in a python ContextVar, making the context manager
thread and async-safe.

(gh-26846)

Performance improvements and changes

  • numpy.save now uses pickle protocol version 4 for saving arrays
    with object dtype, which allows for pickle objects larger than 4GB
    and improves saving speed by about 5% for large arrays.

    (gh-26388)

  • OpenBLAS on x86_64 and i686 is built with fewer kernels. Based on
    benchmarking, there are 5 clusters of performance around these
    kernels: PRESCOTT NEHALEM SANDYBRIDGE HASWELL SKYLAKEX.

    (gh-27147)

  • OpenBLAS on windows is linked without quadmath, simplifying
    licensing

    (gh-27147)

  • Due to a regression in OpenBLAS on windows, the performance
    improvements when using multiple threads for OpenBLAS 0.3.26 were
    reverted.

    (gh-27147)

ma.cov and ma.corrcoef are now significantly faster

The private function has been refactored along with ma.cov and
ma.corrcoef. They are now significantly faster, particularly on large,
masked arrays.

(gh-26285)

Changes

  • As numpy.vecdot is now a ufunc it has a less precise signature.
    This is due to the limitations of ufunc's typing stub.

    (gh-26313)

  • numpy.floor, numpy.ceil, and numpy.trunc now won't perform
    casting to a floating dtype for integer and boolean dtype input
    arrays.

    (gh-26766)

ma.corrcoef may return a slightly different result

A pairwise observation approach is currently used in ma.corrcoef to
calculate the standard deviations for each pair of variables. This has
been changed as it is being used to normalise the covariance, estimated
using ma.cov, which does not consider the observations for each
variable in a pairwise manner, rendering it unnecessary. The
normalisation has been replaced by the more appropriate standard
deviation for each variable, which significantly reduces the wall time,
but will return slightly different estimates of the correlation
coefficients in cases where the observations between a pair of variables
are not aligned. However, it will return the same estimates in all other
cases, including returning the same correlation matrix as corrcoef
when using a masked array with no masked values.

(gh-26285)

Cast-safety fixes in copyto and full

copyto now uses NEP 50 correctly and applies this to its cast safety.
Python integer to NumPy integer casts and Python float to NumPy float
casts are now considered "safe" even if assignment may fail or
precision may be lost. This means the following examples change
slightly:

`np.copyto(int8_arr, 1000)` previously performed an unsafe/same-kind cast

:   of the Python integer. It will now always raise, to achieve an
    unsafe cast you must pass an array or NumPy scalar.
  • np.copyto(uint8_arr, 1000, casting="safe") will raise an
    OverflowError rather than a TypeError due to same-kind casting.

  • np.copyto(float32_arr, 1e300, casting="safe") will overflow to
    inf (float32 cannot hold 1e300) rather raising a TypeError.

Further, only the dtype is used when assigning NumPy scalars (or 0-d
arrays), meaning that the following behaves differently:

  • np.copyto(float32_arr, np.float64(3.0), casting="safe") raises.
  • np.coptyo(int8_arr, np.int64(100), casting="safe") raises.
    Previously, NumPy checked whether the 100 fits the int8_arr.

This aligns copyto, full, and full_like with the correct NumPy 2
behavior.

(gh-27091)

Checksums

MD5

8ac48250d6b96fce749fbd0fcf464ff9  numpy-2.1.0rc1-cp310-cp310-macosx_10_9_x86_64.whl
13f92a9f7ed33d71ccfb742de0e3fec9  numpy-2.1.0rc1-cp310-cp310-macosx_11_0_arm64.whl
ba9286f6bd7a238eaead5ae2111d23a8  numpy-2.1.0rc1-cp310-cp310-macosx_14_0_arm64.whl
dc2b6c2f586090bc80268a81afec4c6f  numpy-2.1.0rc1-cp310-cp310-macosx_14_0_x86_64.whl
16a13eb5dfad8008baf937026fa2db62  numpy-2.1.0rc1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
c5d5697af3047b8a3dc7a5d6ca86ec86  numpy-2.1.0rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
0e48596167a215333f277ff29ea29c45  numpy-2.1.0rc1-cp310-cp310-musllinux_1_1_x86_64.whl
381957df326f45c0fba0b64a00a043ac  numpy-2.1.0rc1-cp310-cp310-musllinux_1_2_aarch64.whl
676fd27cea96af93142b4b420d9cb8af  numpy-2.1.0rc1-cp310-cp310-win32.whl
b30bff4e8846c52e58fab9564b422ed2  numpy-2.1.0rc1-cp310-cp310-win_amd64.whl
4ee7c88591a445b3b5969999eeb7b0a7  numpy-2.1.0rc1-cp311-cp311-macosx_10_9_x86_64.whl
556393087caa0bb6eec1a76dfe2cad32  numpy-2.1.0rc1-cp311-cp311-macosx_14_0_arm64.whl
4e2b2eb39fc3a6ca28048588fc6a5338  numpy-2.1.0rc1-cp311-cp311-macosx_14_0_x86_64.whl
34f5ab41c4c6a3ecbf0cc0b108a63942  numpy-2.1.0rc1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
689944e33b04a11878aecaf59611341b  numpy-2.1.0rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
5d2a53263c7daa9a3b9a89a4dc8ef3ac  numpy-2.1.0rc1-cp311-cp311-musllinux_1_1_x86_64.whl
29e27f96f56d0d1b59f9b261ed6fe438  numpy-2.1.0rc1-cp311-cp311-musllinux_1_2_aarch64.whl
f07177a3b6779e6747137e2173a545de  numpy-2.1.0rc1-cp311-cp311-win32.whl
f2d1f68c8c0455cba32be4aa50f5afed  numpy-2.1.0rc1-cp311-cp311-win_amd64.whl
8500240d88e6e3afc281c562af083fd7  numpy-2.1.0rc1-cp312-cp312-macosx_10_9_x86_64.whl
3280b4ad3a5ceb814d739a9c980d16d6  numpy-2.1.0rc1-cp312-cp312-macosx_11_0_arm64.whl
77a6339def5185efa262658c51d6e44e  numpy-2.1.0rc1-cp312-cp312-macosx_14_0_arm64.whl
2e3a71b9ef1e60ce37949af87475f5f7  numpy-2.1.0rc1-cp312-cp312-macosx_14_0_x86_64.whl
3c1877cd6108cb502ac1df39cfec86d0  numpy-2.1.0rc1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
ae1a9945726e7d970ee0b6232d5d9b4d  numpy-2.1.0rc1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
f1a71557d35d8b2f87f277e85c958b2b  numpy-2.1.0rc1-cp312-cp312-musllinux_1_1_x86_64.whl
b1ba7049684a7d674c006325b4606dd1  numpy-2.1.0rc1-cp312-cp312-musllinux_1_2_aarch64.whl
5944d81459d443a72346e7ea767b72a2  numpy-2.1.0rc1-cp312-cp312-win32.whl
f8b17b8f9bddb1c21844ae2475f72389  numpy-2.1.0rc1-cp312-cp312-win_amd64.whl
084ecd080c6871ed034ef69cda7573de  numpy-2.1.0rc1-cp313-cp313-macosx_10_13_x86_64.whl
dbeca273db0240ca7fe395611f0c23c8  numpy-2.1.0rc1-cp313-cp313-macosx_11_0_arm64.whl
242794f34818844e0fe695ec42c62dbe  numpy-2.1.0rc1-cp313-cp313-macosx_14_0_arm64.whl
3f1c04457ce363250ac5d37935172527  numpy-2.1.0rc1-cp313-cp313-macosx_14_0_x86_64.whl
2ce171281092e5f5d9f3d1ce8a615a94  numpy-2.1.0rc1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
95416f883c14a10fca22007594c94a94  numpy-2.1.0rc1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
36c07d317516f84cb376cc475b3ed13d  numpy-2.1.0rc1-cp313-cp313-musllinux_1_1_x86_64.whl
e7c1f9c2964e4d71878a1654194452b2  numpy-2.1.0rc1-cp313-cp313-musllinux_1_2_aarch64.whl
ea27f5a8b6dfa219b630aee52e621c8c  numpy-2.1.0rc1-cp313-cp313-win32.whl
1821d7e0980f297296509090cfd9c288  numpy-2.1.0rc1-cp313-cp313-win_amd64.whl
1b7f8160179aef59822e3eb43cb8a210  numpy-2.1.0rc1-cp313-cp313t-macosx_10_13_x86_64.whl
fed8d00d6819c467ef97e0b7611624cd  numpy-2.1.0rc1-cp313-cp313t-macosx_11_0_arm64.whl
f58df469b6ec5e1755b1572702b56716  numpy-2.1.0rc1-cp313-cp313t-macosx_14_0_arm64.whl
fe13066a540c68598b1180bec61e8e30  numpy-2.1.0rc1-cp313-cp313t-macosx_14_0_x86_64.whl
67d51902daf5bc9de69c6e46dfea9a64  numpy-2.1.0rc1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
8409acd1916df8f8630260207a5b4eec  numpy-2.1.0rc1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
e64a5ccac64641cbbbd2caa652ff815a  numpy-2.1.0rc1-cp313-cp313t-musllinux_1_1_x86_64.whl
488776d734d4eddc9c1540bf862106bb  numpy-2.1.0rc1-cp313-cp313t-musllinux_1_2_aarch64.whl
fbc57a82683e2c9697a6992290ebe337  numpy-2.1.0rc1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl
ed26d5d79acc222e107900668edcd01f  numpy-2.1.0rc1-pp310-pypy310_pp73-macosx_14_0_x86_64.whl
c29f8c6a55c1ac9e5c693f63ec17f251  numpy-2.1.0rc1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
4beab0a7bde06687f699e75cd04ec024  numpy-2.1.0rc1-pp310-pypy310_pp73-win_amd64.whl
88e72b72f2859ff084eb3863fac3ac20  numpy-2.1.0rc1.tar.gz

SHA256

590acae9e4b0baa895850c0edab988c329a196bacc7326f3249fa5fe7b94e5a8  numpy-2.1.0rc1-cp310-cp310-macosx_10_9_x86_64.whl
61cf71f62033987ed49b78a19465f40fcbf6f7e94674eda21096ebde6935c2e0  numpy-2.1.0rc1-cp310-cp310-macosx_11_0_arm64.whl
0c489f6c47bbed44918c9c8036a679614920da2a45f481d0eca2ad168ca5327f  numpy-2.1.0rc1-cp310-cp310-macosx_14_0_arm64.whl
4c33387be8eadc07d0834e0b9e2ead53117fe76ab2dadd37ee80d1df80be4c05  numpy-2.1.0rc1-cp310-cp310-macosx_14_0_x86_64.whl
f412923d4ce1ec29aa3cf7752598e5eb154f549cfbf62d7c6f3cc76cb25b32e0  numpy-2.1.0rc1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
06156c55771da4952a2432aa457cd96159675dcab4336f5307bff042535cb6ea  numpy-2.1.0rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
be3ddd26a22d032914cfca5ef7db74f31adbd6c9d88a6f4e21ebd8e057d9474c  numpy-2.1.0rc1-cp310-cp310-musllinux_1_1_x86_64.whl
12b38b0f3ddc1342863a6849f4fcb3f506e1d21179ebd34b7aa55a30cb50899f  numpy-2.1.0rc1-cp310-cp310-musllinux_1_2_aarch64.whl
17581a2080012afe603c43005c9d050570e54683dde0d395e3edb4fa9c25f328  numpy-2.1.0rc1-cp310-cp310-win32.whl
8ee3ab33c02a0bd7d219a184c9bc43811de373551529981035673ca2a1ba7b93  numpy-2.1.0rc1-cp310-cp310-win_amd64.whl
2d3d1e61191e408a11658a64e9f9bb61741ad28c160576c95dac9df6f74713b4  numpy-2.1.0rc1-cp311-cp311-macosx_10_9_x86_64.whl
4e08e733600647242a9046b6aff888e72fe8a846b00855e5136e7641b08d25d8  numpy-2.1.0rc1-cp311-cp311-macosx_14_0_arm64.whl
2b0e379a15c6b8eb69bb8170d10cfbb8a0dc9126b5402ee8860a2646f4111c3d  numpy-2.1.0rc1-cp311-cp311-macosx_14_0_x86_64.whl
fea6d6939d9bf098d96c6d22bb3e4ff39f8eb3f0f26b52c8c69ba06845490095  numpy-2.1.0rc1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
9a6bdc19830703eee91e7eb2d671b165febefbf5eec6a4f163d1833d23be17af  numpy-2.1.0rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
58a07f2947aa06ca03d922a86ac30e403ce8282cd15904606bac852bf29ea2ad  numpy-2.1.0rc1-cp311-cp311-musllinux_1_1_x86_64.whl
1a4f960e2e5c1084cf6b1d15482a5556ecc122855d631a2395063ab703d62fdd  numpy-2.1.0rc1-cp311-cp311-musllinux_1_2_aarch64.whl
f38fabd7b8d14fb7d63fbb2d07971d6edd518d2a43542c63c29164c901d2a758  numpy-2.1.0rc1-cp311-cp311-win32.whl
e82b8e0b88d493d4e882f18de30f679bf1197c82d8c799acb5fdb4068cadb945  numpy-2.1.0rc1-cp311-cp311-win_amd64.whl
dc2af0135139bbb26b1ea5bdc430e049edb745ae643cb898afb32549ce4801de  numpy-2.1.0rc1-cp312-cp312-macosx_10_9_x86_64.whl
47f11bf152d8707217feb46e9662a8b1aa3554a8ee56b64d2aa99c3e9914f101  numpy-2.1.0rc1-cp312-cp312-macosx_11_0_arm64.whl
3b534c62b1887b4bfa80f633485f2a9338f5d46d720b6cc695d2ba8b38d98987  numpy-2.1.0rc1-cp312-cp312-macosx_14_0_arm64.whl
f4e07df8476545da7cf23f75811f4fc334b06fc50d8e945e897cfc00c8f89690  numpy-2.1.0rc1-cp312-cp312-macosx_14_0_x86_64.whl
c8458becc562ee35b30b5e53173933414cf42e56b3f4f3d80997bf0dda7308d1  numpy-2.1.0rc1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
524b5311d21741f0b3f48efcdd3442546be3b38507a4e3b0f5138e4340f5dee0  numpy-2.1.0rc1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
7bcb4f360dc9e29b4f5f9fb36b35b429e731373843ccf39a22105bd809ef3138  numpy-2.1.0rc1-cp312-cp312-musllinux_1_1_x86_64.whl
5821c9831fad20cd1a8621a9ed483322ca97a9da9832690a4050ffedcb3e766b  numpy-2.1.0rc1-cp312-cp312-musllinux_1_2_aarch64.whl
1d9e0ddfb33a7a78fe92d49aaa2992a78ed5aff4cef7a21d8b1057cca075cc85  numpy-2.1.0rc1-cp312-cp312-win32.whl
86cc61c5479ed3b324011aa69484cae8f491b7f58dc0e54acf0894bdb4fae879  numpy-2.1.0rc1-cp312-cp312-win_amd64.whl
64e8de086d2e4dac41fa286412321469b4535677184e78cc78e5061b44f0e4bf  numpy-2.1.0rc1-cp313-cp313-macosx_10_13_x86_64.whl
e74dc488a27b90f31ab307b4cf3f07a45bb78a0e91cfb36d69c6eced4f36089b  numpy-2.1.0rc1-cp313-cp313-macosx_11_0_arm64.whl
f73e4fcf7455d3b734e6ecbafdbc12d3c1dd8f2146fd186e003ae1c8f00e5eed  numpy-2.1.0rc1-cp313-cp313-macosx_14_0_arm64.whl
e5a64ac6016839fd906b3d7cc1f7ecb145c7d44a310234b6843f3b23b8ec0651  numpy-2.1.0rc1-cp313-cp313-macosx_14_0_x86_64.whl
ccc68ee27362f8d3516deecffa124d1488ae20347628e357264e7e66dbdaba08  numpy-2.1.0rc1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
d3d59479b98cc364b8a08ddd854c7817b5c578a521b56af5a96b3a9db18cc9b7  numpy-2.1.0rc1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
15c6bde88f242747258cfee803f3161b7a2c1ffead0817e409d95444a79b4029  numpy-2.1.0rc1-cp313-cp313-musllinux_1_1_x86_64.whl
3e9276bff9a57100b53e5f9c44469baca1e58ec612e5143db568d69ec27b65ea  numpy-2.1.0rc1-cp313-cp313-musllinux_1_2_aarch64.whl
53979581e6acdd75b7ce94e6d3b70994f9f8cf1021316d388a159f7f388bdc7f  numpy-2.1.0rc1-cp313-cp313-win32.whl
ca195cd9d1d84b3498532968237774a6e06e2a4afe706b87172f1d033b95e230  numpy-2.1.0rc1-cp313-cp313-win_amd64.whl
77fa9826cbc7273e4bc3b7aa289b86936c942fe2c91bc35617c2417e14421592  numpy-2.1.0rc1-cp313-cp313t-macosx_10_13_x86_64.whl
140c5ce21f1eccb254e550c8431825cb716eb76e896202cffa7a0d2a843506da  numpy-2.1.0rc1-cp313-cp313t-macosx_11_0_arm64.whl
713cb46d266514db773de52af677aa931cc896a4f5e52f494449c4ff53ce6051  numpy-2.1.0rc1-cp313-cp313t-macosx_14_0_arm64.whl
3f79d241e4833a2a570b6e6639d2114d497011e48a351798bba81fda51560ab7  numpy-2.1.0rc1-cp313-cp313t-macosx_14_0_x86_64.whl
48a724dbfad6f4933e2c8a22239980e1b5bc16868df3450cc4ebeb9522b7902f  numpy-2.1.0rc1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
06d14d20b7e98c8c06bb62e56f2b64747dd10c422bb8adbf1e6dd82cd8442e12  numpy-2.1.0rc1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
98a1486861fa3c603a5a3ccd56fc45b9756372bb30f6fb559b898fc2fad82e0d  numpy-2.1.0rc1-cp313-cp313t-musllinux_1_1_x86_64.whl
50b3dab872001b87052532bd4da3879fda856a2cf6c9418c19bfc94dc290e259  numpy-2.1.0rc1-cp313-cp313t-musllinux_1_2_aarch64.whl
14dea4f0d62ddd1a7f9d7b0003b35a537ac41a2b6205deec8c9c25a8e01748b4  numpy-2.1.0rc1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl
4f9317da3aa64d0ee93950d3f319b3fe0169500e25c18223715cba39e89808bd  numpy-2.1.0rc1-pp310-pypy310_pp73-macosx_14_0_x86_64.whl
0a5a25ab780b8c29e443824abefc6ca79047ceeb889a6f76d7b1953649498e93  numpy-2.1.0rc1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
0816fd52956e14551d8d71319d4b4fcfa1bcb21641f2c603f4eb64c65b1e1009  numpy-2.1.0rc1-pp310-pypy310_pp73-win_amd64.whl
dc7ce867d277aa74555c67b93ef2a6f78bd7bd73e6c2bbafeb96f8bccd05b9d9  numpy-2.1.0rc1.tar.gz
numpy -

Published by charris 3 months ago

NumPy 2.0.1 Release Notes

NumPy 2.0.1 is a maintenance release that fixes bugs and regressions
discovered after the 2.0.0 release. NumPy 2.0.1 is the last planned
release in the 2.0.x series, 2.1.0rc1 should be out shortly.

The Python versions supported by this release are 3.9-3.12.

NOTE: Do not use the GitHub generated "Source code" files listed in the "Assets", they are garbage.

Improvements

np.quantile with method closest_observation chooses nearest even order statistic

This changes the definition of nearest for border cases from the nearest
odd order statistic to nearest even order statistic. The numpy
implementation now matches other reference implementations.

(gh-26656)

Contributors

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

  • @vahidmech +
  • Alex Herbert +
  • Charles Harris
  • Giovanni Del Monte +
  • Leo Singer
  • Lysandros Nikolaou
  • Matti Picus
  • Nathan Goldbaum
  • Patrick J. Roddy +
  • Raghuveer Devulapalli
  • Ralf Gommers
  • Rostan Tabet +
  • Sebastian Berg
  • Tyler Reddy
  • Yannik Wicke +

Pull requests merged

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

  • #26711: MAINT: prepare 2.0.x for further development
  • #26792: TYP: fix incorrect import in ma/extras.pyi stub
  • #26793: DOC: Mention '1.25' legacy printing mode in set_printoptions
  • #26794: DOC: Remove mention of NaN and NAN aliases from constants
  • #26821: BLD: Fix x86-simd-sort build failure on openBSD
  • #26822: BUG: Ensure output order follows input in numpy.fft
  • #26823: TYP: fix missing sys import in numeric.pyi
  • #26832: DOC: remove hack to override _add_newdocs_scalars
  • #26835: BUG: avoid side-effect of 'include complex.h'
  • #26836: BUG: fix max_rows and chunked string/datetime reading in loadtxt
  • #26837: BUG: fix PyArray_ImportNumPyAPI under -Werror=strict-prototypes
  • #26856: DOC: Update some documentation
  • #26868: BUG: fancy indexing copy
  • #26869: BUG: Mismatched allocation domains in PyArray_FillWithScalar
  • #26870: BUG: Handle --f77flags and --f90flags for meson [wheel build]
  • #26887: BUG: Fix new DTypes and new string promotion when signature is...
  • #26888: BUG: remove numpy.f2py from excludedimports
  • #26959: BUG: Quantile closest_observation to round to nearest even order
  • #26960: BUG: Fix off-by-one error in amount of characters in strip
  • #26961: API: Partially revert unique with return_inverse
  • #26962: BUG,MAINT: Fix utf-8 character stripping memory access
  • #26963: BUG: Fix out-of-bound minimum offset for in1d table method
  • #26971: BUG: fix f2py tests to work with v2 API
  • #26995: BUG: Add object cast to avoid warning with limited API

Checksums

MD5

a3e7d0f361ee7302448cae3c10844dd3  numpy-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl
cff8546b69e43ae7b5050f05bdc25df2  numpy-2.0.1-cp310-cp310-macosx_11_0_arm64.whl
1713d23342528f4f8f4027970f010068  numpy-2.0.1-cp310-cp310-macosx_14_0_arm64.whl
20020d28606ea58f986a262daa6018f1  numpy-2.0.1-cp310-cp310-macosx_14_0_x86_64.whl
db22154ea943a707917aebc79e449bc5  numpy-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
fe86cd85f240216f64eb076a62a229d2  numpy-2.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
e0ca08f85150af3cc6050d64e8c0bd27  numpy-2.0.1-cp310-cp310-musllinux_1_1_x86_64.whl
b76f432906f62e31f0e09c41f3f08b4c  numpy-2.0.1-cp310-cp310-musllinux_1_2_aarch64.whl
28e8109e4ef524fa5c272d6faec870ae  numpy-2.0.1-cp310-cp310-win32.whl
874beffaefdc73da42300ce691c2419c  numpy-2.0.1-cp310-cp310-win_amd64.whl
7bbe029f650c924e952da117842d456d  numpy-2.0.1-cp311-cp311-macosx_10_9_x86_64.whl
6d3d6ae26c520e93cef7f11ba3951f57  numpy-2.0.1-cp311-cp311-macosx_11_0_arm64.whl
de6082d719437eb7468ae31c407c503e  numpy-2.0.1-cp311-cp311-macosx_14_0_arm64.whl
d15a8d95661f8a1dfcc4eb089f9b46e8  numpy-2.0.1-cp311-cp311-macosx_14_0_x86_64.whl
c181105e074ee575ccf2c992e40f947a  numpy-2.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
00d22b299343fcdc78fbb0716ead6243  numpy-2.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
d9c4f49dbedb3f3d0158f00db459bd25  numpy-2.0.1-cp311-cp311-musllinux_1_1_x86_64.whl
63caa03e0625327ad3a756e01c83a6ca  numpy-2.0.1-cp311-cp311-musllinux_1_2_aarch64.whl
99d01d768a115d448ca2b4680de15191  numpy-2.0.1-cp311-cp311-win32.whl
8d1a31eccc8b9f077312095b11f62cb2  numpy-2.0.1-cp311-cp311-win_amd64.whl
6cc86f7761a33941d8c1c552186e774b  numpy-2.0.1-cp312-cp312-macosx_10_9_x86_64.whl
67c48f352afff5f41108f1b9561d1d5c  numpy-2.0.1-cp312-cp312-macosx_11_0_arm64.whl
1068d4eadcac6a869e0e457853b7e611  numpy-2.0.1-cp312-cp312-macosx_14_0_arm64.whl
dfb667450315fddcf84381fc8ef16892  numpy-2.0.1-cp312-cp312-macosx_14_0_x86_64.whl
69822bbbbb65d8a7d00ae32b435f61cc  numpy-2.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
883ed6c41395fb2def6cc0d64dcb817f  numpy-2.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
4b1e9fd464821a7d1de3a8ddf911311e  numpy-2.0.1-cp312-cp312-musllinux_1_1_x86_64.whl
79e6557f40b8ed8f5973b404d98eab3d  numpy-2.0.1-cp312-cp312-musllinux_1_2_aarch64.whl
85596f15d4cf85c2f78b4cc12c2cad1e  numpy-2.0.1-cp312-cp312-win32.whl
487c7c2944306f62b3770576ce903a91  numpy-2.0.1-cp312-cp312-win_amd64.whl
491093641afa21e65d6e629eb70571fc  numpy-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl
5008b16c20f3d7e5a0c7764712f8908e  numpy-2.0.1-cp39-cp39-macosx_11_0_arm64.whl
14633b898f863ea797c40ba1cf226c29  numpy-2.0.1-cp39-cp39-macosx_14_0_arm64.whl
9054ecb69d21b364e59e94aab24247cb  numpy-2.0.1-cp39-cp39-macosx_14_0_x86_64.whl
be028cf4bb691921943939de17593dd7  numpy-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
9c440ad02ff0a954f696637de37aab2d  numpy-2.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
27aec0d286eabe26d8e9149f4572dba1  numpy-2.0.1-cp39-cp39-musllinux_1_1_x86_64.whl
b02eda82ee511ee27185c8a4073ea35c  numpy-2.0.1-cp39-cp39-musllinux_1_2_aarch64.whl
cf579b902325e023b2dc444692eb5991  numpy-2.0.1-cp39-cp39-win32.whl
302c8c3118a5f55d9ef35ed8e517f6b1  numpy-2.0.1-cp39-cp39-win_amd64.whl
34c17fe980accfb76c6f348f85b3cfef  numpy-2.0.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
02676eb84379b0a223288d6fd9d76942  numpy-2.0.1-pp39-pypy39_pp73-macosx_14_0_x86_64.whl
b5300e6fe110bf69e1a8901c5c09e3f8  numpy-2.0.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
204a3ea7fb851e08d166c74f73f9b8a3  numpy-2.0.1-pp39-pypy39_pp73-win_amd64.whl
5df3c50fc124c3167404d396115898d0  numpy-2.0.1.tar.gz

SHA256

0fbb536eac80e27a2793ffd787895242b7f18ef792563d742c2d673bfcb75134  numpy-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl
69ff563d43c69b1baba77af455dd0a839df8d25e8590e79c90fcbe1499ebde42  numpy-2.0.1-cp310-cp310-macosx_11_0_arm64.whl
1b902ce0e0a5bb7704556a217c4f63a7974f8f43e090aff03fcf262e0b135e02  numpy-2.0.1-cp310-cp310-macosx_14_0_arm64.whl
f1659887361a7151f89e79b276ed8dff3d75877df906328f14d8bb40bb4f5101  numpy-2.0.1-cp310-cp310-macosx_14_0_x86_64.whl
4658c398d65d1b25e1760de3157011a80375da861709abd7cef3bad65d6543f9  numpy-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
4127d4303b9ac9f94ca0441138acead39928938660ca58329fe156f84b9f3015  numpy-2.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
e5eeca8067ad04bc8a2a8731183d51d7cbaac66d86085d5f4766ee6bf19c7f87  numpy-2.0.1-cp310-cp310-musllinux_1_1_x86_64.whl
9adbd9bb520c866e1bfd7e10e1880a1f7749f1f6e5017686a5fbb9b72cf69f82  numpy-2.0.1-cp310-cp310-musllinux_1_2_aarch64.whl
7b9853803278db3bdcc6cd5beca37815b133e9e77ff3d4733c247414e78eb8d1  numpy-2.0.1-cp310-cp310-win32.whl
81b0893a39bc5b865b8bf89e9ad7807e16717f19868e9d234bdaf9b1f1393868  numpy-2.0.1-cp310-cp310-win_amd64.whl
75b4e316c5902d8163ef9d423b1c3f2f6252226d1aa5cd8a0a03a7d01ffc6268  numpy-2.0.1-cp311-cp311-macosx_10_9_x86_64.whl
6e4eeb6eb2fced786e32e6d8df9e755ce5be920d17f7ce00bc38fcde8ccdbf9e  numpy-2.0.1-cp311-cp311-macosx_11_0_arm64.whl
a1e01dcaab205fbece13c1410253a9eea1b1c9b61d237b6fa59bcc46e8e89343  numpy-2.0.1-cp311-cp311-macosx_14_0_arm64.whl
a8fc2de81ad835d999113ddf87d1ea2b0f4704cbd947c948d2f5513deafe5a7b  numpy-2.0.1-cp311-cp311-macosx_14_0_x86_64.whl
5a3d94942c331dd4e0e1147f7a8699a4aa47dffc11bf8a1523c12af8b2e91bbe  numpy-2.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
15eb4eca47d36ec3f78cde0a3a2ee24cf05ca7396ef808dda2c0ddad7c2bde67  numpy-2.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
b83e16a5511d1b1f8a88cbabb1a6f6a499f82c062a4251892d9ad5d609863fb7  numpy-2.0.1-cp311-cp311-musllinux_1_1_x86_64.whl
1f87fec1f9bc1efd23f4227becff04bd0e979e23ca50cc92ec88b38489db3b55  numpy-2.0.1-cp311-cp311-musllinux_1_2_aarch64.whl
36d3a9405fd7c511804dc56fc32974fa5533bdeb3cd1604d6b8ff1d292b819c4  numpy-2.0.1-cp311-cp311-win32.whl
08458fbf403bff5e2b45f08eda195d4b0c9b35682311da5a5a0a0925b11b9bd8  numpy-2.0.1-cp311-cp311-win_amd64.whl
6bf4e6f4a2a2e26655717a1983ef6324f2664d7011f6ef7482e8c0b3d51e82ac  numpy-2.0.1-cp312-cp312-macosx_10_9_x86_64.whl
7d6fddc5fe258d3328cd8e3d7d3e02234c5d70e01ebe377a6ab92adb14039cb4  numpy-2.0.1-cp312-cp312-macosx_11_0_arm64.whl
5daab361be6ddeb299a918a7c0864fa8618af66019138263247af405018b04e1  numpy-2.0.1-cp312-cp312-macosx_14_0_arm64.whl
ea2326a4dca88e4a274ba3a4405eb6c6467d3ffbd8c7d38632502eaae3820587  numpy-2.0.1-cp312-cp312-macosx_14_0_x86_64.whl
529af13c5f4b7a932fb0e1911d3a75da204eff023ee5e0e79c1751564221a5c8  numpy-2.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
6790654cb13eab303d8402354fabd47472b24635700f631f041bd0b65e37298a  numpy-2.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
cbab9fc9c391700e3e1287666dfd82d8666d10e69a6c4a09ab97574c0b7ee0a7  numpy-2.0.1-cp312-cp312-musllinux_1_1_x86_64.whl
99d0d92a5e3613c33a5f01db206a33f8fdf3d71f2912b0de1739894668b7a93b  numpy-2.0.1-cp312-cp312-musllinux_1_2_aarch64.whl
173a00b9995f73b79eb0191129f2455f1e34c203f559dd118636858cc452a1bf  numpy-2.0.1-cp312-cp312-win32.whl
bb2124fdc6e62baae159ebcfa368708867eb56806804d005860b6007388df171  numpy-2.0.1-cp312-cp312-win_amd64.whl
bfc085b28d62ff4009364e7ca34b80a9a080cbd97c2c0630bb5f7f770dae9414  numpy-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl
8fae4ebbf95a179c1156fab0b142b74e4ba4204c87bde8d3d8b6f9c34c5825ef  numpy-2.0.1-cp39-cp39-macosx_11_0_arm64.whl
72dc22e9ec8f6eaa206deb1b1355eb2e253899d7347f5e2fae5f0af613741d06  numpy-2.0.1-cp39-cp39-macosx_14_0_arm64.whl
ec87f5f8aca726117a1c9b7083e7656a9d0d606eec7299cc067bb83d26f16e0c  numpy-2.0.1-cp39-cp39-macosx_14_0_x86_64.whl
1f682ea61a88479d9498bf2091fdcd722b090724b08b31d63e022adc063bad59  numpy-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
8efc84f01c1cd7e34b3fb310183e72fcdf55293ee736d679b6d35b35d80bba26  numpy-2.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
3fdabe3e2a52bc4eff8dc7a5044342f8bd9f11ef0934fcd3289a788c0eb10018  numpy-2.0.1-cp39-cp39-musllinux_1_1_x86_64.whl
24a0e1befbfa14615b49ba9659d3d8818a0f4d8a1c5822af8696706fbda7310c  numpy-2.0.1-cp39-cp39-musllinux_1_2_aarch64.whl
f9cf5ea551aec449206954b075db819f52adc1638d46a6738253a712d553c7b4  numpy-2.0.1-cp39-cp39-win32.whl
e9e81fa9017eaa416c056e5d9e71be93d05e2c3c2ab308d23307a8bc4443c368  numpy-2.0.1-cp39-cp39-win_amd64.whl
61728fba1e464f789b11deb78a57805c70b2ed02343560456190d0501ba37b0f  numpy-2.0.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
12f5d865d60fb9734e60a60f1d5afa6d962d8d4467c120a1c0cda6eb2964437d  numpy-2.0.1-pp39-pypy39_pp73-macosx_14_0_x86_64.whl
eacf3291e263d5a67d8c1a581a8ebbcfd6447204ef58828caf69a5e3e8c75990  numpy-2.0.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
2c3a346ae20cfd80b6cfd3e60dc179963ef2ea58da5ec074fd3d9e7a1e7ba97f  numpy-2.0.1-pp39-pypy39_pp73-win_amd64.whl
485b87235796410c3519a699cfe1faab097e509e90ebb05dcd098db2ae87e7b3  numpy-2.0.1.tar.gz
numpy -

Published by charris 4 months ago

NumPy 2.0.0 Release Notes

NumPy 2.0.0 is the first major release since 2006. It is the result of
11 months of development since the last feature release and is the work
of 212 contributors spread over 1078 pull requests. It contains a large
number of exciting new features as well as changes to both the Python
and C APIs.

This major release includes breaking changes that could not happen in a
regular minor (feature) release - including an ABI break, changes to
type promotion rules, and API changes which may not have been emitting
deprecation warnings in 1.26.x. Key documents related to how to adapt to
changes in NumPy 2.0, in addition to these release notes, include:

Highlights

Highlights of this release include:

  • New features:
    • A new variable-length string dtype, numpy.dtypes.StringDType and a new
      numpy.strings namespace with performant ufuncs for string operations,
    • Support for float32 and longdouble in all
      numpy.fft functions,
    • Support for the array API standard in the main numpy
      namespace.
  • Performance improvements:
    • Sorting functions sort, argsort,
      partition, argpartition have been
      accelerated through the use of the Intel x86-simd-sort and
      Google Highway libraries, and may see large (hardware-specific)
      speedups,
    • macOS Accelerate support and binary wheels for macOS >=14, with
      significant performance improvements for linear algebra
      operations on macOS, and wheels that are about 3 times smaller,
    • numpy.char fixed-length string operations have
      been accelerated by implementing ufuncs that also support
      numpy.dtypes.StringDType in addition to the
      fixed-length string dtypes,
    • A new tracing and introspection API,
      numpy.lib.introspect.opt_func_info, to determine
      which hardware-specific kernels are available and will be
      dispatched to.
    • numpy.save now uses pickle protocol version 4 for saving
      arrays with object dtype, which allows for pickle objects larger
      than 4GB and improves saving speed by about 5% for large arrays.
  • Python API improvements:
    • A clear split between public and private API, with a new module
      structure and each public function now available in a single place.
    • Many removals of non-recommended functions and aliases. This
      should make it easier to learn and use NumPy. The number of
      objects in the main namespace decreased by ~10% and in
      numpy.lib by ~80%.
    • Canonical dtype names and a new numpy.isdtype` introspection
      function,
  • C API improvements:
    • A new public C API for creating custom dtypes,
    • Many outdated functions and macros removed, and private
      internals hidden to ease future extensibility,
    • New, easier to use, initialization functions: PyArray_ImportNumPyAPI
      and PyUFunc_ImportUFuncAPI.
  • Improved behavior:
    • Improvements to type promotion behavior was changed by adopting NEP 50.
      This fixes many user surprises about promotions which previously often
      depended on data values of input arrays rather than only their dtypes.
      Please see the NEP and the numpy-2-migration-guide for details as this
      change can lead to changes in output dtypes and lower precision results
      for mixed-dtype operations.
    • The default integer type on Windows is now int64 rather than
      int32, matching the behavior on other platforms,
    • The maximum number of array dimensions is changed from 32 to 64
  • Documentation:
    • The reference guide navigation was significantly improved, and
      there is now documentation on NumPy's
      module structure,
    • The building from source documentation was completely rewritten,

Furthermore there are many changes to NumPy internals, including
continuing to migrate code from C to C++, that will make it easier to
improve and maintain NumPy in the future.

The "no free lunch" theorem dictates that there is a price to pay for
all these API and behavior improvements and better future extensibility.
This price is:

  1. Backwards compatibility. There are a significant number of breaking
    changes to both the Python and C APIs. In the majority of cases,
    there are clear error messages that will inform the user how to
    adapt their code. However, there are also changes in behavior for
    which it was not possible to give such an error message - these
    cases are all covered in the Deprecation and Compatibility sections
    below, and in the numpy-2-migration-guide.

    Note that there is a ruff mode to auto-fix many things in Python
    code.

  2. Breaking changes to the NumPy ABI. As a result, binaries of packages
    that use the NumPy C API and were built against a NumPy 1.xx release
    will not work with NumPy 2.0. On import, such packages will see an
    ImportError with a message about binary incompatibility.

    It is possible to build binaries against NumPy 2.0 that will work at
    runtime with both NumPy 2.0 and 1.x. See numpy-2-abi-handling for more
    details.

    All downstream packages that depend on the NumPy ABI are advised
    to do a new release built against NumPy 2.0 and verify that that
    release works with both 2.0 and 1.26 - ideally in the period between
    2.0.0rc1 (which will be ABI-stable) and the final 2.0.0 release to
    avoid problems for their users.

The Python versions supported by this release are 3.9-3.12.

NumPy 2.0 Python API removals

  • np.geterrobj, np.seterrobj and the related ufunc keyword
    argument extobj= have been removed. The preferred replacement for
    all of these is using the context manager with np.errstate():.

    (gh-23922)

  • np.cast has been removed. The literal replacement for
    np.cast[dtype](arg) is np.asarray(arg, dtype=dtype).

  • np.source has been removed. The preferred replacement is
    inspect.getsource.

  • np.lookfor has been removed.

    (gh-24144)

  • numpy.who has been removed. As an alternative for the removed
    functionality, one can use a variable explorer that is available in
    IDEs such as Spyder or Jupyter Notebook.

    (gh-24321)

  • Warnings and exceptions present in numpy.exceptions,
    e.g, numpy.exceptions.ComplexWarning,
    numpy.exceptions.VisibleDeprecationWarning, are no
    longer exposed in the main namespace.

  • Multiple niche enums, expired members and functions have been
    removed from the main namespace, such as: ERR_*, SHIFT_*,
    np.fastCopyAndTranspose, np.kernel_version, np.numarray,
    np.oldnumeric and np.set_numeric_ops.

    (gh-24316)

  • Replaced from ... import * in the numpy/__init__.py with
    explicit imports. As a result, these main namespace members got
    removed: np.FLOATING_POINT_SUPPORT, np.FPE_*, np.NINF,
    np.PINF, np.NZERO, np.PZERO, np.CLIP, np.WRAP, np.WRAP,
    np.RAISE, np.BUFSIZE, np.UFUNC_BUFSIZE_DEFAULT,
    np.UFUNC_PYVALS_NAME, np.ALLOW_THREADS, np.MAXDIMS,
    np.MAY_SHARE_EXACT, np.MAY_SHARE_BOUNDS, add_newdoc,
    np.add_docstring and np.add_newdoc_ufunc.

    (gh-24357)

  • Alias np.float_ has been removed. Use np.float64 instead.

  • Alias np.complex_ has been removed. Use np.complex128 instead.

  • Alias np.longfloat has been removed. Use np.longdouble instead.

  • Alias np.singlecomplex has been removed. Use np.complex64
    instead.

  • Alias np.cfloat has been removed. Use np.complex128 instead.

  • Alias np.longcomplex has been removed. Use np.clongdouble
    instead.

  • Alias np.clongfloat has been removed. Use np.clongdouble
    instead.

  • Alias np.string_ has been removed. Use np.bytes_ instead.

  • Alias np.unicode_ has been removed. Use np.str_ instead.

  • Alias np.Inf has been removed. Use np.inf instead.

  • Alias np.Infinity has been removed. Use np.inf instead.

  • Alias np.NaN has been removed. Use np.nan instead.

  • Alias np.infty has been removed. Use np.inf instead.

  • Alias np.mat has been removed. Use np.asmatrix instead.

  • np.issubclass_ has been removed. Use the issubclass builtin
    instead.

  • np.asfarray has been removed. Use np.asarray with a proper dtype
    instead.

  • np.set_string_function has been removed. Use np.set_printoptions
    instead with a formatter for custom printing of NumPy objects.

  • np.tracemalloc_domain is now only available from np.lib.

  • np.recfromcsv and recfromtxt are now only available from
    np.lib.npyio.

  • np.issctype, np.maximum_sctype, np.obj2sctype,
    np.sctype2char, np.sctypes, np.issubsctype were all removed
    from the main namespace without replacement, as they where niche
    members.

  • Deprecated np.deprecate and np.deprecate_with_doc has been
    removed from the main namespace. Use DeprecationWarning instead.

  • Deprecated np.safe_eval has been removed from the main namespace.
    Use ast.literal_eval instead.

    (gh-24376)

  • np.find_common_type has been removed. Use numpy.promote_types or
    numpy.result_type instead. To achieve semantics for the
    scalar_types argument, use numpy.result_type and pass 0,
    0.0, or 0j as a Python scalar instead.

  • np.round_ has been removed. Use np.round instead.

  • np.nbytes has been removed. Use np.dtype(<dtype>).itemsize
    instead.

    (gh-24477)

  • np.compare_chararrays has been removed from the main namespace.
    Use np.char.compare_chararrays instead.

  • The charrarray in the main namespace has been deprecated. It can
    be imported without a deprecation warning from np.char.chararray
    for now, but we are planning to fully deprecate and remove
    chararray in the future.

  • np.format_parser has been removed from the main namespace. Use
    np.rec.format_parser instead.

    (gh-24587)

  • Support for seven data type string aliases has been removed from
    np.dtype: int0, uint0, void0, object0, str0, bytes0
    and bool8.

    (gh-24807)

  • The experimental numpy.array_api submodule has been removed. Use
    the main numpy namespace for regular usage instead, or the
    separate array-api-strict package for the compliance testing use
    case for which numpy.array_api was mostly used.

    (gh-25911)

__array_prepare__ is removed

UFuncs called __array_prepare__ before running computations for normal
ufunc calls (not generalized ufuncs, reductions, etc.). The function was
also called instead of __array_wrap__ on the results of some linear
algebra functions.

It is now removed. If you use it, migrate to __array_ufunc__ or rely
on __array_wrap__ which is called with a context in all cases,
although only after the result array is filled. In those code paths,
__array_wrap__ will now be passed a base class, rather than a subclass
array.

(gh-25105)

Deprecations

  • np.compat has been deprecated, as Python 2 is no longer supported.

  • numpy.int8 and similar classes will no longer support conversion
    of out of bounds python integers to integer arrays. For example,
    conversion of 255 to int8 will not return -1. numpy.iinfo(dtype)
    can be used to check the machine limits for data types. For example,
    np.iinfo(np.uint16) returns min = 0 and max = 65535.

    np.array(value).astype(dtype) will give the desired result.

  • np.safe_eval has been deprecated. ast.literal_eval should be
    used instead.

    (gh-23830)

  • np.recfromcsv, np.recfromtxt, np.disp, np.get_array_wrap,
    np.maximum_sctype, np.deprecate and np.deprecate_with_doc have
    been deprecated.

    (gh-24154)

  • np.trapz has been deprecated. Use np.trapezoid or a
    scipy.integrate function instead.

  • np.in1d has been deprecated. Use np.isin instead.

  • Alias np.row_stack has been deprecated. Use np.vstack directly.

    (gh-24445)

  • __array_wrap__ is now passed arr, context, return_scalar and
    support for implementations not accepting all three are deprecated.
    Its signature should be
    __array_wrap__(self, arr, context=None, return_scalar=False)

    (gh-25409)

  • Arrays of 2-dimensional vectors for np.cross have been deprecated.
    Use arrays of 3-dimensional vectors instead.

    (gh-24818)

  • np.dtype("a") alias for np.dtype(np.bytes_) was deprecated. Use
    np.dtype("S") alias instead.

    (gh-24854)

  • Use of keyword arguments x and y with functions
    assert_array_equal and assert_array_almost_equal has been
    deprecated. Pass the first two arguments as positional arguments
    instead.

    (gh-24978)

numpy.fft deprecations for n-D transforms with None values in arguments

Using fftn, ifftn, rfftn, irfftn, fft2, ifft2, rfft2 or
irfft2 with the s parameter set to a value that is not None and
the axes parameter set to None has been deprecated, in line with the
array API standard. To retain current behaviour, pass a sequence [0,
..., k-1] to axes for an array of dimension k.

Furthermore, passing an array to s which contains None values is
deprecated as the parameter is documented to accept a sequence of
integers in both the NumPy docs and the array API specification. To use
the default behaviour of the corresponding 1-D transform, pass the value
matching the default for its n parameter. To use the default behaviour
for every axis, the s argument can be omitted.

(gh-25495)

np.linalg.lstsq now defaults to a new rcond value

numpy.linalg.lstsq now uses the new rcond value of the
machine precision times max(M, N). Previously, the machine precision
was used but a FutureWarning was given to notify that this change will
happen eventually. That old behavior can still be achieved by passing
rcond=-1.

(gh-25721)

Expired deprecations

  • The np.core.umath_tests submodule has been removed from the public
    API. (Deprecated in NumPy 1.15)

    (gh-23809)

  • The PyDataMem_SetEventHook deprecation has expired and it is
    removed. Use tracemalloc and the np.lib.tracemalloc_domain
    domain. (Deprecated in NumPy 1.23)

    (gh-23921)

  • The deprecation of set_numeric_ops and the C functions
    PyArray_SetNumericOps and PyArray_GetNumericOps has been expired
    and the functions removed. (Deprecated in NumPy 1.16)

    (gh-23998)

  • The fasttake, fastclip, and fastputmask ArrFuncs deprecation
    is now finalized.

  • The deprecated function fastCopyAndTranspose and its C counterpart
    are now removed.

  • The deprecation of PyArray_ScalarFromObject is now finalized.

    (gh-24312)

  • np.msort has been removed. For a replacement, np.sort(a, axis=0)
    should be used instead.

    (gh-24494)

  • np.dtype(("f8", 1) will now return a shape 1 subarray dtype rather
    than a non-subarray one.

    (gh-25761)

  • Assigning to the .data attribute of an ndarray is disallowed and
    will raise.

  • np.binary_repr(a, width) will raise if width is too small.

  • Using NPY_CHAR in PyArray_DescrFromType() will raise, use
    NPY_STRING NPY_UNICODE, or NPY_VSTRING instead.

    (gh-25794)

Compatibility notes

loadtxt and genfromtxt default encoding changed

loadtxt and genfromtxt now both default to encoding=None which may
mainly modify how converters work. These will now be passed str
rather than bytes. Pass the encoding explicitly to always get the new
or old behavior. For genfromtxt the change also means that returned
values will now be unicode strings rather than bytes.

(gh-25158)

f2py compatibility notes

  • f2py will no longer accept ambiguous -m and .pyf CLI
    combinations. When more than one .pyf file is passed, an error is
    raised. When both -m and a .pyf is passed, a warning is emitted
    and the -m provided name is ignored.

    (gh-25181)

  • The f2py.compile() helper has been removed because it leaked
    memory, has been marked as experimental for several years now, and
    was implemented as a thin subprocess.run wrapper. It was also one
    of the test bottlenecks. See
    gh-25122 for the full
    rationale. It also used several np.distutils features which are
    too fragile to be ported to work with meson.

  • Users are urged to replace calls to f2py.compile with calls to
    subprocess.run("python", "-m", "numpy.f2py",... instead, and to
    use environment variables to interact with meson. Native
    files
    are also an
    option.

    (gh-25193)

Minor changes in behavior of sorting functions

Due to algorithmic changes and use of SIMD code, sorting functions with
methods that aren't stable may return slightly different results in
2.0.0 compared to 1.26.x. This includes the default method of
numpy.argsort and numpy.argpartition.

Removed ambiguity when broadcasting in np.solve

The broadcasting rules for np.solve(a, b) were ambiguous when b had
1 fewer dimensions than a. This has been resolved in a
backward-incompatible way and is now compliant with the Array API. The
old behaviour can be reconstructed by using
np.solve(a, b[..., None])[..., 0].

(gh-25914)

Modified representation for Polynomial

The representation method for
numpy.polynomial.polynomial.Polynomial was updated to
include the domain in the representation. The plain text and latex
representations are now consistent. For example the output of
str(np.polynomial.Polynomial([1, 1], domain=[.1, .2])) used to be
1.0 + 1.0 x, but now is 1.0 + 1.0 (-3.0000000000000004 + 20.0 x).

(gh-21760)

C API changes

  • The PyArray_CGT, PyArray_CLT, PyArray_CGE, PyArray_CLE,
    PyArray_CEQ, PyArray_CNE macros have been removed.

  • PyArray_MIN and PyArray_MAX have been moved from
    ndarraytypes.h to npy_math.h.

    (gh-24258)

  • A C API for working with numpy.dtypes.StringDType
    arrays has been exposed. This includes functions for acquiring and
    releasing mutexes which lock access to the string data, as well as
    packing and unpacking UTF-8 bytestreams from array entries.

  • NPY_NTYPES has been renamed to NPY_NTYPES_LEGACY as it does not
    include new NumPy built-in DTypes. In particular the new string
    DType will likely not work correctly with code that handles legacy
    DTypes.

    (gh-25347)

  • The C-API now only exports the static inline function versions of
    the array accessors (previously this depended on using "deprecated
    API"). While we discourage it, the struct fields can still be used
    directly.

    (gh-25789)

  • NumPy now defines PyArray_Pack to set an individual memory address.
    Unlike PyArray_SETITEM this function is equivalent to setting an
    individual array item and does not require a NumPy array input.

    (gh-25954)

  • The ->f slot has been removed from PyArray_Descr. If you use this slot,
    replace accessing it with PyDataType_GetArrFuncs (see its documentation
    and the numpy-2-migration-guide). In some cases using other functions
    like PyArray_GETITEM may be an alternatives.

  • PyArray_GETITEM and PyArray_SETITEM now require the import of
    the NumPy API table to be used and are no longer defined in
    ndarraytypes.h.

    (gh-25812)

  • Due to runtime dependencies, the definition for functionality
    accessing the dtype flags was moved from numpy/ndarraytypes.h and
    is only available after including numpy/ndarrayobject.h as it
    requires import_array(). This includes PyDataType_FLAGCHK,
    PyDataType_REFCHK and NPY_BEGIN_THREADS_DESCR.

  • The dtype flags on PyArray_Descr must now be accessed through the
    PyDataType_FLAGS inline function to be compatible with both 1.x
    and 2.x. This function is defined in npy_2_compat.h to allow
    backporting. Most or all users should use PyDataType_FLAGCHK which
    is available on 1.x and does not require backporting. Cython users
    should use Cython 3. Otherwise access will go through Python unless
    they use PyDataType_FLAGCHK instead.

    (gh-25816)

Datetime functionality exposed in the C API and Cython bindings

The functions NpyDatetime_ConvertDatetime64ToDatetimeStruct,
NpyDatetime_ConvertDatetimeStructToDatetime64,
NpyDatetime_ConvertPyDateTimeToDatetimeStruct,
NpyDatetime_GetDatetimeISO8601StrLen,
NpyDatetime_MakeISO8601Datetime, and
NpyDatetime_ParseISO8601Datetime have been added to the C API to
facilitate converting between strings, Python datetimes, and NumPy
datetimes in external libraries.

(gh-21199)

Const correctness for the generalized ufunc C API

The NumPy C API's functions for constructing generalized ufuncs
(PyUFunc_FromFuncAndData, PyUFunc_FromFuncAndDataAndSignature,
PyUFunc_FromFuncAndDataAndSignatureAndIdentity) take types and
data arguments that are not modified by NumPy's internals. Like the
name and doc arguments, third-party Python extension modules are
likely to supply these arguments from static constants. The types and
data arguments are now const-correct: they are declared as
const char *types and void *const *data, respectively. C code should
not be affected, but C++ code may be.

(gh-23847)

Larger NPY_MAXDIMS and NPY_MAXARGS, NPY_RAVEL_AXIS introduced

NPY_MAXDIMS is now 64, you may want to review its use. This is usually
used in a stack allocation, where the increase should be safe. However,
we do encourage generally to remove any use of NPY_MAXDIMS and
NPY_MAXARGS to eventually allow removing the constraint completely.
For the conversion helper and C-API functions mirroring Python ones such as
take, NPY_MAXDIMS was used to mean axis=None. Such usage must be replaced
with NPY_RAVEL_AXIS. See also migration_maxdims.

(gh-25149)

NPY_MAXARGS not constant and PyArrayMultiIterObject size change

Since NPY_MAXARGS was increased, it is now a runtime constant and not
compile-time constant anymore. We expect almost no users to notice this.
But if used for stack allocations it now must be replaced with a custom
constant using NPY_MAXARGS as an additional runtime check.

The sizeof(PyArrayMultiIterObject) no longer includes the full size of
the object. We expect nobody to notice this change. It was necessary to
avoid issues with Cython.

(gh-25271)

Required changes for custom legacy user dtypes

In order to improve our DTypes it is unfortunately necessary to break
the ABI, which requires some changes for dtypes registered with
PyArray_RegisterDataType. Please see the documentation of
PyArray_RegisterDataType for how to adapt your code and achieve
compatibility with both 1.x and 2.x.

(gh-25792)

New Public DType API

The C implementation of the NEP 42 DType API is now public. While the
DType API has shipped in NumPy for a few versions, it was only usable in
sessions with a special environment variable set. It is now possible to
write custom DTypes outside of NumPy using the new DType API and the
normal import_array() mechanism for importing the numpy C API.

See dtype-api for more details about the API. As always with a new feature,
please report any bugs you run into implementing or using a new DType. It is
likely that downstream C code that works with dtypes will need to be updated to
work correctly with new DTypes.

(gh-25754)

New C-API import functions

We have now added PyArray_ImportNumPyAPI and PyUFunc_ImportUFuncAPI
as static inline functions to import the NumPy C-API tables. The new
functions have two advantages over import_array and import_ufunc:

  • They check whether the import was already performed and are
    light-weight if not, allowing to add them judiciously (although this
    is not preferable in most cases).
  • The old mechanisms were macros rather than functions which included
    a return statement.

The PyArray_ImportNumPyAPI() function is included in npy_2_compat.h
for simpler backporting.

(gh-25866)

Structured dtype information access through functions

The dtype structures fields c_metadata, names, fields, and
subarray must now be accessed through new functions following the same
names, such as PyDataType_NAMES. Direct access of the fields is not
valid as they do not exist for all PyArray_Descr instances. The
metadata field is kept, but the macro version should also be
preferred.

(gh-25802)

Descriptor elsize and alignment access

Unless compiling only with NumPy 2 support, the elsize and aligment
fields must now be accessed via PyDataType_ELSIZE,
PyDataType_SET_ELSIZE, and PyDataType_ALIGNMENT. In cases where the
descriptor is attached to an array, we advise using PyArray_ITEMSIZE
as it exists on all NumPy versions. Please see
migration_c_descr for more information.

(gh-25943)

NumPy 2.0 C API removals

  • npy_interrupt.h and the corresponding macros like NPY_SIGINT_ON
    have been removed. We recommend querying PyErr_CheckSignals() or
    PyOS_InterruptOccurred() periodically (these do currently require
    holding the GIL though).

  • The noprefix.h header has been removed. Replace missing symbols
    with their prefixed counterparts (usually an added NPY_ or
    npy_).

    (gh-23919)

  • PyUFunc_GetPyVals, PyUFunc_handlefperr, and PyUFunc_checkfperr
    have been removed. If needed, a new backwards compatible function to
    raise floating point errors could be restored. Reason for removal:
    there are no known users and the functions would have made
    with np.errstate() fixes much more difficult).

    (gh-23922)

  • The numpy/old_defines.h which was part of the API deprecated since
    NumPy 1.7 has been removed. This removes macros of the form
    PyArray_CONSTANT. The
    replace_old_macros.sed
    script may be useful to convert them to the NPY_CONSTANT version.

    (gh-24011)

  • The legacy_inner_loop_selector member of the ufunc struct is
    removed to simplify improvements to the dispatching system. There
    are no known users overriding or directly accessing this member.

    (gh-24271)

  • NPY_INTPLTR has been removed to avoid confusion (see intp
    redefinition).

    (gh-24888)

  • The advanced indexing MapIter and related API has been removed.
    The (truly) public part of it was not well tested and had only one
    known user (Theano). Making it private will simplify improvements to
    speed up ufunc.at, make advanced indexing more maintainable, and
    was important for increasing the maximum number of dimensions of
    arrays to 64. Please let us know if this API is important to you so
    we can find a solution together.

    (gh-25138)

  • The NPY_MAX_ELSIZE macro has been removed, as it only ever
    reflected builtin numeric types and served no internal purpose.

    (gh-25149)

  • PyArray_REFCNT and NPY_REFCOUNT are removed. Use Py_REFCNT
    instead.

    (gh-25156)

  • PyArrayFlags_Type and PyArray_NewFlagsObject as well as
    PyArrayFlagsObject are private now. There is no known use-case;
    use the Python API if needed.

  • PyArray_MoveInto, PyArray_CastTo, PyArray_CastAnyTo are
    removed use PyArray_CopyInto and if absolutely needed
    PyArray_CopyAnyInto (the latter does a flat copy).

  • PyArray_FillObjectArray is removed, its only true use was for
    implementing np.empty. Create a new empty array or use
    PyArray_FillWithScalar() (decrefs existing objects).

  • PyArray_CompareUCS4 and PyArray_CompareString are removed. Use
    the standard C string comparison functions.

  • PyArray_ISPYTHON is removed as it is misleading, has no known
    use-cases, and is easy to replace.

  • PyArray_FieldNames is removed, as it is unclear what it would be
    useful for. It also has incorrect semantics in some possible
    use-cases.

  • PyArray_TypestrConvert is removed, since it seems a misnomer and
    unlikely to be used by anyone. If you know the size or are limited
    to few types, just use it explicitly, otherwise go via Python
    strings.

    (gh-25292)

  • PyDataType_GetDatetimeMetaData is removed, it did not actually do
    anything since at least NumPy 1.7.

    (gh-25802)

  • PyArray_GetCastFunc is removed. Note that custom legacy user
    dtypes can still provide a castfunc as their implementation, but any
    access to them is now removed. The reason for this is that NumPy
    never used these internally for many years. If you use simple
    numeric types, please just use C casts directly. In case you require
    an alternative, please let us know so we can create new API such as
    PyArray_CastBuffer() which could use old or new cast functions
    depending on the NumPy version.

    (gh-25161)

New Features

np.add was extended to work with unicode and bytes dtypes.

(gh-24858)

A new bitwise_count function

This new function counts the number of 1-bits in a number.
numpy.bitwise_count works on all the numpy integer types
and integer-like objects.

>>> a = np.array([2**i - 1 for i in range(16)])
>>> np.bitwise_count(a)
array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15],
      dtype=uint8)

(gh-19355)

macOS Accelerate support, including the ILP64

Support for the updated Accelerate BLAS/LAPACK library, including ILP64
(64-bit integer) support, in macOS 13.3 has been added. This brings
arm64 support, and significant performance improvements of up to 10x for
commonly used linear algebra operations. When Accelerate is selected at
build time, or if no explicit BLAS library selection is done, the 13.3+
version will automatically be used if available.

(gh-24053)

Binary wheels are also available. On macOS >=14.0, users who install
NumPy from PyPI will get wheels built against Accelerate rather than
OpenBLAS.

(gh-25255)

Option to use weights for quantile and percentile functions

A weights keyword is now available for numpy.quantile, numpy.percentile,
numpy.nanquantile and numpy.nanpercentile. Only method="inverted_cdf"
supports weights.

(gh-24254)

Improved CPU optimization tracking

A new tracer mechanism is available which enables tracking of the
enabled targets for each optimized function (i.e., that uses
hardware-specific SIMD instructions) in the NumPy library. With this
enhancement, it becomes possible to precisely monitor the enabled CPU
dispatch targets for the dispatched functions.

A new function named opt_func_info has been added to the new namespace
numpy.lib.introspect, offering this tracing capability. This function allows
you to retrieve information about the enabled targets based on function names
and data type signatures.

(gh-24420)

A new Meson backend for f2py

f2py in compile mode (i.e. f2py -c) now accepts the
--backend meson option. This is the default option for Python >=3.12.
For older Python versions, f2py will still default to
--backend distutils.

To support this in realistic use-cases, in compile mode f2py takes a
--dep flag one or many times which maps to dependency() calls in the
meson backend, and does nothing in the distutils backend.

There are no changes for users of f2py only as a code generator, i.e.
without -c.

(gh-24532)

bind(c) support for f2py

Both functions and subroutines can be annotated with bind(c). f2py
will handle both the correct type mapping, and preserve the unique label
for other C interfaces.

Note: bind(c, name = 'routine_name_other_than_fortran_routine') is
not honored by the f2py bindings by design, since bind(c) with the
name is meant to guarantee only the same name in C and Fortran, not in
Python and Fortran.

(gh-24555)

A new strict option for several testing functions

The strict keyword is now available for numpy.testing.assert_allclose,
numpy.testing.assert_equal, and numpy.testing.assert_array_less. Setting
strict=True will disable the broadcasting behaviour for scalars and ensure
that input arrays have the same data type.

(gh-24680,
gh-24770,
gh-24775)

Add np.core.umath.find and np.core.umath.rfind UFuncs

Add two find and rfind UFuncs that operate on unicode or byte
strings and are used in np.char. They operate similar to str.find
and str.rfind.

(gh-24868)

diagonal and trace for numpy.linalg

numpy.linalg.diagonal and numpy.linalg.trace have been added, which are
array API standard-compatible variants of numpy.diagonal and numpy.trace.
They differ in the default axis selection which define 2-D sub-arrays.

(gh-24887)

New long and ulong dtypes

numpy.long and numpy.ulong have been added as NumPy integers mapping to
C's long and unsigned long. Prior to NumPy 1.24, numpy.long was an alias
to Python's int.

(gh-24922)

svdvals for numpy.linalg

numpy.linalg.svdvals has been added. It computes singular values for (a stack
of) matrices. Executing np.svdvals(x) is the same as calling np.svd(x, compute_uv=False, hermitian=False). This function is compatible with the array
API standard.

(gh-24940)

A new isdtype function

numpy.isdtype was added to provide a canonical way to classify NumPy's
dtypes in compliance with the array API standard.

(gh-25054)

A new astype function

numpy.astype was added to provide an array API standard-compatible
alternative to the numpy.ndarray.astype method.

(gh-25079)

Array API compatible functions' aliases

13 aliases for existing functions were added to improve compatibility
with the array API standard:

  • Trigonometry: acos, acosh, asin, asinh, atan, atanh,
    atan2.
  • Bitwise: bitwise_left_shift, bitwise_invert,
    bitwise_right_shift.
  • Misc: concat, permute_dims, pow.
  • In numpy.linalg: tensordot, matmul.

(gh-25086)

New unique_* functions

The numpy.unique_all, numpy.unique_counts, numpy.unique_inverse, and
numpy.unique_values functions have been added. They provide functionality of
numpy.unique with different sets of flags. They are array API
standard-compatible, and because the number of arrays they return does not
depend on the values of input arguments, they are easier to target for JIT
compilation.

(gh-25088)

Matrix transpose support for ndarrays

NumPy now offers support for calculating the matrix transpose of an
array (or stack of arrays). The matrix transpose is equivalent to
swapping the last two axes of an array. Both np.ndarray and
np.ma.MaskedArray now expose a .mT attribute, and there is a
matching new numpy.matrix_transpose function.

(gh-23762)

Array API compatible functions for numpy.linalg

Six new functions and two aliases were added to improve compatibility
with the Array API standard for `numpy.linalg`:

  • numpy.linalg.matrix_norm - Computes the matrix norm of
    a matrix (or a stack of matrices).

  • numpy.linalg.vector_norm - Computes the vector norm of
    a vector (or batch of vectors).

  • numpy.vecdot - Computes the (vector) dot product of
    two arrays.

  • numpy.linalg.vecdot - An alias for
    numpy.vecdot.

  • numpy.linalg.matrix_transpose - An alias for
    numpy.matrix_transpose.

    (gh-25155)

  • numpy.linalg.outer has been added. It computes the
    outer product of two vectors. It differs from
    numpy.outer by accepting one-dimensional arrays only.
    This function is compatible with the array API standard.

    (gh-25101)

  • numpy.linalg.cross has been added. It computes the
    cross product of two (arrays of) 3-dimensional vectors. It differs
    from numpy.cross by accepting three-dimensional
    vectors only. This function is compatible with the array API
    standard.

    (gh-25145)

A correction argument for var and std

A correction argument was added to numpy.var and numpy.std, which is an
array API standard compatible alternative to ddof. As both arguments serve a
similar purpose, only one of them can be provided at the same time.

(gh-25169)

ndarray.device and ndarray.to_device

An ndarray.device attribute and ndarray.to_device method were added
to numpy.ndarray for array API standard compatibility.

Additionally, device keyword-only arguments were added to:
numpy.asarray, numpy.arange, numpy.empty, numpy.empty_like,
numpy.eye, numpy.full, numpy.full_like, numpy.linspace, numpy.ones,
numpy.ones_like, numpy.zeros, and numpy.zeros_like.

For all these new arguments, only device="cpu" is supported.

(gh-25233)

StringDType has been added to NumPy

We have added a new variable-width UTF-8 encoded string data type, implementing
a "NumPy array of Python strings", including support for a user-provided
missing data sentinel. It is intended as a drop-in replacement for arrays of
Python strings and missing data sentinels using the object dtype. See
NEP 55 and the documentation
of stringdtype for more details.

(gh-25347)

New keywords for cholesky and pinv

The upper and rtol keywords were added to
numpy.linalg.cholesky and numpy.linalg.pinv,
respectively, to improve array API standard compatibility.

For numpy.linalg.pinv, if neither rcond nor rtol is
specified, the rcond's default is used. We plan to deprecate and
remove rcond in the future.

(gh-25388)

New keywords for sort, argsort and linalg.matrix_rank

New keyword parameters were added to improve array API standard
compatibility:

  • rtol was added to numpy.linalg.matrix_rank.
  • stable was added to numpy.sort and
    numpy.argsort.

(gh-25437)

New numpy.strings namespace for string ufuncs

NumPy now implements some string operations as ufuncs. The old np.char
namespace is still available, and where possible the string manipulation
functions in that namespace have been updated to use the new ufuncs,
substantially improving their performance.

Where possible, we suggest updating code to use functions in
np.strings instead of np.char. In the future we may deprecate
np.char in favor of np.strings.

(gh-25463)

numpy.fft support for different precisions and in-place calculations

The various FFT routines in numpy.fft now do their
calculations natively in float, double, or long double precision,
depending on the input precision, instead of always calculating in
double precision. Hence, the calculation will now be less precise for
single and more precise for long double precision. The data type of the
output array will now be adjusted accordingly.

Furthermore, all FFT routines have gained an out argument that can be
used for in-place calculations.

(gh-25536)

configtool and pkg-config support

A new numpy-config CLI script is available that can be queried for the
NumPy version and for compile flags needed to use the NumPy C API. This
will allow build systems to better support the use of NumPy as a
dependency. Also, a numpy.pc pkg-config file is now included with
Numpy. In order to find its location for use with PKG_CONFIG_PATH, use
numpy-config --pkgconfigdir.

(gh-25730)

Array API standard support in the main namespace

The main numpy namespace now supports the array API standard. See
array-api-standard-compatibility for
details.

(gh-25911)

Improvements

Strings are now supported by any, all, and the logical ufuncs.

(gh-25651)

Integer sequences as the shape argument for memmap

numpy.memmap can now be created with any integer sequence
as the shape argument, such as a list or numpy array of integers.
Previously, only the types of tuple and int could be used without
raising an error.

(gh-23729)

errstate is now faster and context safe

The numpy.errstate context manager/decorator is now faster
and safer. Previously, it was not context safe and had (rare) issues
with thread-safety.

(gh-23936)

AArch64 quicksort speed improved by using Highway's VQSort

The first introduction of the Google Highway library, using VQSort on
AArch64. Execution time is improved by up to 16x in some cases, see the
PR for benchmark results. Extensions to other platforms will be done in
the future.

(gh-24018)

Complex types - underlying C type changes

  • The underlying C types for all of NumPy's complex types have been
    changed to use C99 complex types.

  • While this change does not affect the memory layout of complex
    types, it changes the API to be used to directly retrieve or write
    the real or complex part of the complex number, since direct field
    access (as in c.real or c.imag) is no longer an option. You can
    now use utilities provided in numpy/npy_math.h to do these
    operations, like this:

    npy_cdouble c;
    npy_csetreal(&c, 1.0);
    npy_csetimag(&c, 0.0);
    printf("%d + %di\n", npy_creal(c), npy_cimag(c));
    
  • To ease cross-version compatibility, equivalent macros and a
    compatibility layer have been added which can be used by downstream
    packages to continue to support both NumPy 1.x and 2.x. See
    complex-numbers for more info.

  • numpy/npy_common.h now includes complex.h, which means that
    complex is now a reserved keyword.

(gh-24085)

iso_c_binding support and improved common blocks for f2py

Previously, users would have to define their own custom f2cmap file to
use type mappings defined by the Fortran2003 iso_c_binding intrinsic
module. These type maps are now natively supported by f2py

(gh-24555)

f2py now handles common blocks which have kind specifications from
modules. This further expands the usability of intrinsics like
iso_fortran_env and iso_c_binding.

(gh-25186)

Call str automatically on third argument to functions like assert_equal

The third argument to functions like
numpy.testing.assert_equal now has str called on it
automatically. This way it mimics the built-in assert statement, where
assert_equal(a, b, obj) works like assert a == b, obj.

(gh-24877)

Support for array-like atol/rtol in isclose, allclose

The keywords atol and rtol in numpy.isclose and
numpy.allclose now accept both scalars and arrays. An
array, if given, must broadcast to the shapes of the first two array
arguments.

(gh-24878)

Consistent failure messages in test functions

Previously, some numpy.testing assertions printed messages
that referred to the actual and desired results as x and y. Now,
these values are consistently referred to as ACTUAL and DESIRED.

(gh-24931)

n-D FFT transforms allow s[i] == -1

The numpy.fft.fftn, numpy.fft.ifftn,
numpy.fft.rfftn, numpy.fft.irfftn,
numpy.fft.fft2, numpy.fft.ifft2,
numpy.fft.rfft2 and numpy.fft.irfft2
functions now use the whole input array along the axis i if
s[i] == -1, in line with the array API standard.

(gh-25495)

Guard PyArrayScalar_VAL and PyUnicodeScalarObject for the limited API

PyUnicodeScalarObject holds a PyUnicodeObject, which is not
available when using Py_LIMITED_API. Add guards to hide it and
consequently also make the PyArrayScalar_VAL macro hidden.

(gh-25531)

Changes

  • np.gradient() now returns a tuple rather than a list making the
    return value immutable.

    (gh-23861)

  • Being fully context and thread-safe, np.errstate can only be
    entered once now.

  • np.setbufsize is now tied to np.errstate(): leaving an
    np.errstate context will also reset the bufsize.

    (gh-23936)

  • A new public np.lib.array_utils submodule has been introduced and
    it currently contains three functions: byte_bounds (moved from
    np.lib.utils), normalize_axis_tuple and normalize_axis_index.

    (gh-24540)

  • Introduce numpy.bool as the new canonical name for
    NumPy's boolean dtype, and make numpy.bool\_ an alias
    to it. Note that until NumPy 1.24, np.bool was an alias to
    Python's builtin bool. The new name helps with array API standard
    compatibility and is a more intuitive name.

    (gh-25080)

  • The dtype.flags value was previously stored as a signed integer.
    This means that the aligned dtype struct flag lead to negative flags
    being set (-128 rather than 128). This flag is now stored unsigned
    (positive). Code which checks flags manually may need to adapt. This
    may include code compiled with Cython 0.29.x.

    (gh-25816)

Representation of NumPy scalars changed

As per NEP 51, the scalar representation has been updated to include the type
information to avoid confusion with Python scalars.

Scalars are now printed as np.float64(3.0) rather than just 3.0.
This may disrupt workflows that store representations of numbers (e.g.,
to files) making it harder to read them. They should be stored as
explicit strings, for example by using str() or f"{scalar!s}". For
the time being, affected users can use
np.set_printoptions(legacy="1.25") to get the old behavior (with
possibly a few exceptions). Documentation of downstream projects may
require larger updates, if code snippets are tested. We are working on
tooling for
doctest-plus
to facilitate updates.

(gh-22449)

Truthiness of NumPy strings changed

NumPy strings previously were inconsistent about how they defined if the
string is True or False and the definition did not match the one
used by Python. Strings are now considered True when they are
non-empty and False when they are empty. This changes the following
distinct cases:

  • Casts from string to boolean were previously roughly equivalent to
    string_array.astype(np.int64).astype(bool), meaning that only
    valid integers could be cast. Now a string of "0" will be
    considered True since it is not empty. If you need the old
    behavior, you may use the above step (casting to integer first) or
    string_array == "0" (if the input is only ever 0 or 1). To get
    the new result on old NumPy versions use string_array != "".
  • np.nonzero(string_array) previously ignored whitespace so that a
    string only containing whitespace was considered False. Whitespace
    is now considered True.

This change does not affect np.loadtxt, np.fromstring, or
np.genfromtxt. The first two still use the integer definition, while
genfromtxt continues to match for "true" (ignoring case). However,
if np.bool_ is used as a converter the result will change.

The change does affect np.fromregex as it uses direct assignments.

(gh-23871)

A mean keyword was added to var and std function

Often when the standard deviation is needed the mean is also needed. The
same holds for the variance and the mean. Until now the mean is then
calculated twice, the change introduced here for the numpy.var and
numpy.std functions allows for passing in a precalculated mean as an keyword
argument. See the docstrings for details and an example illustrating the
speed-up.

(gh-24126)

Remove datetime64 deprecation warning when constructing with timezone

The numpy.datetime64 method now issues a UserWarning rather than a
DeprecationWarning whenever a timezone is included in the datetime string that
is provided.

(gh-24193)

Default integer dtype is now 64-bit on 64-bit Windows

The default NumPy integer is now 64-bit on all 64-bit systems as the
historic 32-bit default on Windows was a common source of issues. Most
users should not notice this. The main issues may occur with code
interfacing with libraries written in a compiled language like C. For
more information see migration_windows_int64.

(gh-24224)

Renamed numpy.core to numpy._core

Accessing numpy.core now emits a DeprecationWarning. In practice we
have found that most downstream usage of numpy.core was to access
functionality that is available in the main numpy namespace. If for
some reason you are using functionality in numpy.core that is not
available in the main numpy namespace, this means you are likely using
private NumPy internals. You can still access these internals via
numpy._core without a deprecation warning but we do not provide any
backward compatibility guarantees for NumPy internals. Please open an
issue if you think a mistake was made and something needs to be made
public.

(gh-24634)

The "relaxed strides" debug build option, which was previously enabled
through the NPY_RELAXED_STRIDES_DEBUG environment variable or the
-Drelaxed-strides-debug config-settings flag has been removed.

(gh-24717)

Redefinition of np.intp/np.uintp (almost never a change)

Due to the actual use of these types almost always matching the use of
size_t/Py_ssize_t this is now the definition in C. Previously, it
matched intptr_t and uintptr_t which would often have been subtly
incorrect. This has no effect on the vast majority of machines since the
size of these types only differ on extremely niche platforms.

However, it means that:

  • Pointers may not necessarily fit into an intp typed array anymore.
    The p and P character codes can still be used, however.
  • Creating intptr_t or uintptr_t typed arrays in C remains
    possible in a cross-platform way via PyArray_DescrFromType('p').
  • The new character codes nN were introduced.
  • It is now correct to use the Python C-API functions when parsing to
    npy_intp typed arguments.

(gh-24888)

numpy.fft.helper made private

numpy.fft.helper was renamed to numpy.fft._helper to indicate that
it is a private submodule. All public functions exported by it should be
accessed from numpy.fft.

(gh-24945)

numpy.linalg.linalg made private

numpy.linalg.linalg was renamed to numpy.linalg._linalg to indicate
that it is a private submodule. All public functions exported by it
should be accessed from numpy.linalg.

(gh-24946)

Out-of-bound axis not the same as axis=None

In some cases axis=32 or for concatenate any large value was the same
as axis=None. Except for concatenate this was deprecate. Any out of
bound axis value will now error, make sure to use axis=None.

(gh-25149)

New copy keyword meaning for array and asarray constructors

Now numpy.array and numpy.asarray support
three values for copy parameter:

  • None - A copy will only be made if it is necessary.
  • True - Always make a copy.
  • False - Never make a copy. If a copy is required a ValueError is
    raised.

The meaning of False changed as it now raises an exception if a copy
is needed.

(gh-25168)

The __array__ special method now takes a copy keyword argument.

NumPy will pass copy to the __array__ special method in situations
where it would be set to a non-default value (e.g. in a call to
np.asarray(some_object, copy=False)). Currently, if an unexpected
keyword argument error is raised after this, NumPy will print a warning
and re-try without the copy keyword argument. Implementations of
objects implementing the __array__ protocol should accept a copy
keyword argument with the same meaning as when passed to
numpy.array or numpy.asarray.

(gh-25168)

Cleanup of initialization of numpy.dtype with strings with commas

The interpretation of strings with commas is changed slightly, in that a
trailing comma will now always create a structured dtype. E.g., where
previously np.dtype("i") and np.dtype("i,") were treated as
identical, now np.dtype("i,") will create a structured dtype, with a
single field. This is analogous to np.dtype("i,i") creating a
structured dtype with two fields, and makes the behaviour consistent
with that expected of tuples.

At the same time, the use of single number surrounded by parenthesis to
indicate a sub-array shape, like in np.dtype("(2)i,"), is deprecated.
Instead; one should use np.dtype("(2,)i") or np.dtype("2i").
Eventually, using a number in parentheses will raise an exception, like
is the case for initializations without a comma, like
np.dtype("(2)i").

(gh-25434)

Change in how complex sign is calculated

Following the array API standard, the complex sign is now calculated as
z / |z| (instead of the rather less logical case where the sign of the
real part was taken, unless the real part was zero, in which case the
sign of the imaginary part was returned). Like for real numbers, zero is
returned if z==0.

(gh-25441)

Return types of functions that returned a list of arrays

Functions that returned a list of ndarrays have been changed to return a
tuple of ndarrays instead. Returning tuples consistently whenever a
sequence of arrays is returned makes it easier for JIT compilers like
Numba, as well as for static type checkers in some cases, to support
these functions. Changed functions are: numpy.atleast_1d, numpy.atleast_2d,
numpy.atleast_3d, numpy.broadcast_arrays, numpy.meshgrid,
numpy.ogrid, numpy.histogramdd.

np.unique return_inverse shape for multi-dimensional inputs

When multi-dimensional inputs are passed to np.unique with
return_inverse=True, the unique_inverse output is now shaped such
that the input can be reconstructed directly using
np.take(unique, unique_inverse) when axis=None, and
np.take_along_axis(unique, unique_inverse, axis=axis) otherwise.

(gh-25553,
gh-25570)

any and all return booleans for object arrays

The any and all functions and methods now return booleans also for
object arrays. Previously, they did a reduction which behaved like the
Python or and and operators which evaluates to one of the arguments.
You can use np.logical_or.reduce and np.logical_and.reduce to
achieve the previous behavior.

(gh-25712)

np.can_cast cannot be called on Python int, float, or complex

np.can_cast cannot be called with Python int, float, or complex
instances anymore. This is because NEP 50 means that the result of
can_cast must not depend on the value passed in. Unfortunately, for
Python scalars whether a cast should be considered "same_kind" or
"safe" may depend on the context and value so that this is currently
not implemented. In some cases, this means you may have to add a
specific path for: if type(obj) in (int, float, complex): ....

(gh-26393)

Checksums

MD5

fcda027f9735771088e607161c913094  numpy-2.0.0-cp310-cp310-macosx_10_9_x86_64.whl
1c381a5af3e6b945c6937ab3c6e2de09  numpy-2.0.0-cp310-cp310-macosx_11_0_arm64.whl
6258de3c0599f8e3674e11898f2dd71c  numpy-2.0.0-cp310-cp310-macosx_14_0_arm64.whl
aa4d28b404566dc9f5c34a31c6cd7b23  numpy-2.0.0-cp310-cp310-macosx_14_0_x86_64.whl
6b83ba81bdc750ef9924e3dc6f7c93be  numpy-2.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
3d129fe67d99e0aad451742abb963ffa  numpy-2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
24a060577965bd2a573ed87cbd207b4c  numpy-2.0.0-cp310-cp310-musllinux_1_1_x86_64.whl
b00832f558669aacf855c4f5e9cf31d1  numpy-2.0.0-cp310-cp310-musllinux_1_2_aarch64.whl
cfe7420d294c583b90cfe07b730136dc  numpy-2.0.0-cp310-cp310-win32.whl
cff9da6b9fe5ad3b05dd3526dff00ac2  numpy-2.0.0-cp310-cp310-win_amd64.whl
f390e03564df5ea37a97ac10cf0cbb00  numpy-2.0.0-cp311-cp311-macosx_10_9_x86_64.whl
a006b081decba286a321de67a1abe246  numpy-2.0.0-cp311-cp311-macosx_11_0_arm64.whl
6aea3e8589e33349b8170524af5a2e44  numpy-2.0.0-cp311-cp311-macosx_14_0_arm64.whl
eea8146c5dc2a306333bfea1f01f7a37  numpy-2.0.0-cp311-cp311-macosx_14_0_x86_64.whl
e96c2af477c970c8ff50ecb5d1cf754f  numpy-2.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
d065256e02a1d410d0db2577bb8fd9a4  numpy-2.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
98c570b79459342c219590c5af38d527  numpy-2.0.0-cp311-cp311-musllinux_1_1_x86_64.whl
dc435751cb926f53a9fc457f35146527  numpy-2.0.0-cp311-cp311-musllinux_1_2_aarch64.whl
aaa4b435d29022ceacb4e3dcbd43d11a  numpy-2.0.0-cp311-cp311-win32.whl
9ff8be4f581d86b2f181fe905491b19b  numpy-2.0.0-cp311-cp311-win_amd64.whl
1c9519c5e6a0c5a99715e51ac3b7c932  numpy-2.0.0-cp312-cp312-macosx_10_9_x86_64.whl
b0f26e8728523d716f5165953b35244f  numpy-2.0.0-cp312-cp312-macosx_11_0_arm64.whl
029703d0ff0e96c603c91f611926ef17  numpy-2.0.0-cp312-cp312-macosx_14_0_arm64.whl
2231ecbb380c70ddf462e9671d06612c  numpy-2.0.0-cp312-cp312-macosx_14_0_x86_64.whl
4153b50c1a3647ca58f1084fcaf3e4c6  numpy-2.0.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
82cba3915234f8018fd754ffc45e95b0  numpy-2.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
249047dd7255a5fcf5c45614ba211e10  numpy-2.0.0-cp312-cp312-musllinux_1_1_x86_64.whl
f7581ebfe0c9d4ae4f3b6ea09c19eea7  numpy-2.0.0-cp312-cp312-musllinux_1_2_aarch64.whl
8a0dbcd919d1d959f1846a00ebb05162  numpy-2.0.0-cp312-cp312-win32.whl
22aabdfd85ed34f02a7cdacff399c5d9  numpy-2.0.0-cp312-cp312-win_amd64.whl
1fce84122c393e05b69e2ec53ecd1137  numpy-2.0.0-cp39-cp39-macosx_10_9_x86_64.whl
81e4c1152274d85813bf14814ad4d359  numpy-2.0.0-cp39-cp39-macosx_11_0_arm64.whl
5eab1a2b427b590d2bc9d8ecd330fc21  numpy-2.0.0-cp39-cp39-macosx_14_0_arm64.whl
ab967929693baf2d2bfb00c53413ad2b  numpy-2.0.0-cp39-cp39-macosx_14_0_x86_64.whl
85d2971cd78800663766f46ba312d356  numpy-2.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
7e831fcf9cff5317429786a3bd123671  numpy-2.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
03a6426ca86ad53567e3ef61bc766013  numpy-2.0.0-cp39-cp39-musllinux_1_1_x86_64.whl
b30af2d2b99468538f45e6769f9fee2b  numpy-2.0.0-cp39-cp39-musllinux_1_2_aarch64.whl
cc9a8db8d131fb5a387e2c1342ab0065  numpy-2.0.0-cp39-cp39-win32.whl
9843951308fa31c5e36c4c6a0b090308  numpy-2.0.0-cp39-cp39-win_amd64.whl
5021eb5e225bff3e05a38a565daf8852  numpy-2.0.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
99186fe49ac7931d3e92e8993c2faa92  numpy-2.0.0-pp39-pypy39_pp73-macosx_14_0_x86_64.whl
c39f0ab6e07d42708550899951b852b8  numpy-2.0.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
cbf151633948e90c93dd988777750961  numpy-2.0.0-pp39-pypy39_pp73-win_amd64.whl
a180aaba9982c6e15da6db62dab5eb4e  numpy-2.0.0.tar.gz

SHA256

04494f6ec467ccb5369d1808570ae55f6ed9b5809d7f035059000a37b8d7e86f  numpy-2.0.0-cp310-cp310-macosx_10_9_x86_64.whl
2635dbd200c2d6faf2ef9a0d04f0ecc6b13b3cad54f7c67c61155138835515d2  numpy-2.0.0-cp310-cp310-macosx_11_0_arm64.whl
0a43f0974d501842866cc83471bdb0116ba0dffdbaac33ec05e6afed5b615238  numpy-2.0.0-cp310-cp310-macosx_14_0_arm64.whl
8d83bb187fb647643bd56e1ae43f273c7f4dbcdf94550d7938cfc32566756514  numpy-2.0.0-cp310-cp310-macosx_14_0_x86_64.whl
79e843d186c8fb1b102bef3e2bc35ef81160ffef3194646a7fdd6a73c6b97196  numpy-2.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
6d7696c615765091cc5093f76fd1fa069870304beaccfd58b5dcc69e55ef49c1  numpy-2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
b4c76e3d4c56f145d41b7b6751255feefae92edbc9a61e1758a98204200f30fc  numpy-2.0.0-cp310-cp310-musllinux_1_1_x86_64.whl
acd3a644e4807e73b4e1867b769fbf1ce8c5d80e7caaef0d90dcdc640dfc9787  numpy-2.0.0-cp310-cp310-musllinux_1_2_aarch64.whl
cee6cc0584f71adefe2c908856ccc98702baf95ff80092e4ca46061538a2ba98  numpy-2.0.0-cp310-cp310-win32.whl
ed08d2703b5972ec736451b818c2eb9da80d66c3e84aed1deeb0c345fefe461b  numpy-2.0.0-cp310-cp310-win_amd64.whl
ad0c86f3455fbd0de6c31a3056eb822fc939f81b1618f10ff3406971893b62a5  numpy-2.0.0-cp311-cp311-macosx_10_9_x86_64.whl
e7f387600d424f91576af20518334df3d97bc76a300a755f9a8d6e4f5cadd289  numpy-2.0.0-cp311-cp311-macosx_11_0_arm64.whl
34f003cb88b1ba38cb9a9a4a3161c1604973d7f9d5552c38bc2f04f829536609  numpy-2.0.0-cp311-cp311-macosx_14_0_arm64.whl
b6f6a8f45d0313db07d6d1d37bd0b112f887e1369758a5419c0370ba915b3871  numpy-2.0.0-cp311-cp311-macosx_14_0_x86_64.whl
5f64641b42b2429f56ee08b4f427a4d2daf916ec59686061de751a55aafa22e4  numpy-2.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
a7039a136017eaa92c1848152827e1424701532ca8e8967fe480fe1569dae581  numpy-2.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
46e161722e0f619749d1cd892167039015b2c2817296104487cd03ed4a955995  numpy-2.0.0-cp311-cp311-musllinux_1_1_x86_64.whl
0e50842b2295ba8414c8c1d9d957083d5dfe9e16828b37de883f51fc53c4016f  numpy-2.0.0-cp311-cp311-musllinux_1_2_aarch64.whl
2ce46fd0b8a0c947ae047d222f7136fc4d55538741373107574271bc00e20e8f  numpy-2.0.0-cp311-cp311-win32.whl
fbd6acc766814ea6443628f4e6751d0da6593dae29c08c0b2606164db026970c  numpy-2.0.0-cp311-cp311-win_amd64.whl
354f373279768fa5a584bac997de6a6c9bc535c482592d7a813bb0c09be6c76f  numpy-2.0.0-cp312-cp312-macosx_10_9_x86_64.whl
4d2f62e55a4cd9c58c1d9a1c9edaedcd857a73cb6fda875bf79093f9d9086f85  numpy-2.0.0-cp312-cp312-macosx_11_0_arm64.whl
1e72728e7501a450288fc8e1f9ebc73d90cfd4671ebbd631f3e7857c39bd16f2  numpy-2.0.0-cp312-cp312-macosx_14_0_arm64.whl
84554fc53daa8f6abf8e8a66e076aff6ece62de68523d9f665f32d2fc50fd66e  numpy-2.0.0-cp312-cp312-macosx_14_0_x86_64.whl
c73aafd1afca80afecb22718f8700b40ac7cab927b8abab3c3e337d70e10e5a2  numpy-2.0.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
49d9f7d256fbc804391a7f72d4a617302b1afac1112fac19b6c6cec63fe7fe8a  numpy-2.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
0ec84b9ba0654f3b962802edc91424331f423dcf5d5f926676e0150789cb3d95  numpy-2.0.0-cp312-cp312-musllinux_1_1_x86_64.whl
feff59f27338135776f6d4e2ec7aeeac5d5f7a08a83e80869121ef8164b74af9  numpy-2.0.0-cp312-cp312-musllinux_1_2_aarch64.whl
c5a59996dc61835133b56a32ebe4ef3740ea5bc19b3983ac60cc32be5a665d54  numpy-2.0.0-cp312-cp312-win32.whl
a356364941fb0593bb899a1076b92dfa2029f6f5b8ba88a14fd0984aaf76d0df  numpy-2.0.0-cp312-cp312-win_amd64.whl
e61155fae27570692ad1d327e81c6cf27d535a5d7ef97648a17d922224b216de  numpy-2.0.0-cp39-cp39-macosx_10_9_x86_64.whl
4554eb96f0fd263041baf16cf0881b3f5dafae7a59b1049acb9540c4d57bc8cb  numpy-2.0.0-cp39-cp39-macosx_11_0_arm64.whl
903703372d46bce88b6920a0cd86c3ad82dae2dbef157b5fc01b70ea1cfc430f  numpy-2.0.0-cp39-cp39-macosx_14_0_arm64.whl
3e8e01233d57639b2e30966c63d36fcea099d17c53bf424d77f088b0f4babd86  numpy-2.0.0-cp39-cp39-macosx_14_0_x86_64.whl
1cde1753efe513705a0c6d28f5884e22bdc30438bf0085c5c486cdaff40cd67a  numpy-2.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
821eedb7165ead9eebdb569986968b541f9908979c2da8a4967ecac4439bae3d  numpy-2.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
9a1712c015831da583b21c5bfe15e8684137097969c6d22e8316ba66b5baabe4  numpy-2.0.0-cp39-cp39-musllinux_1_1_x86_64.whl
9c27f0946a3536403efb0e1c28def1ae6730a72cd0d5878db38824855e3afc44  numpy-2.0.0-cp39-cp39-musllinux_1_2_aarch64.whl
63b92c512d9dbcc37f9d81b123dec99fdb318ba38c8059afc78086fe73820275  numpy-2.0.0-cp39-cp39-win32.whl
3f6bed7f840d44c08ebdb73b1825282b801799e325bcbdfa6bc5c370e5aecc65  numpy-2.0.0-cp39-cp39-win_amd64.whl
9416a5c2e92ace094e9f0082c5fd473502c91651fb896bc17690d6fc475128d6  numpy-2.0.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
17067d097ed036636fa79f6a869ac26df7db1ba22039d962422506640314933a  numpy-2.0.0-pp39-pypy39_pp73-macosx_14_0_x86_64.whl
38ecb5b0582cd125f67a629072fed6f83562d9dd04d7e03256c9829bdec027ad  numpy-2.0.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
cef04d068f5fb0518a77857953193b6bb94809a806bd0a14983a8f12ada060c9  numpy-2.0.0-pp39-pypy39_pp73-win_amd64.whl
cf5d1c9e6837f8af9f92b6bd3e86d513cdc11f60fd62185cc49ec7d1aba34864  numpy-2.0.0.tar.gz
numpy -

Published by charris 5 months ago

NumPy 2.0.0 Release Notes

Note

The release of 2.0 is in progress and the current release overview and
highlights are still in a draft state. However, the highlights should
already list the most significant changes detailed in the full notes
below, and those full notes should be complete (if not copy-edited well
enough yet).

NumPy 2.0.0 is the first major release since 2006. It is the result of
11 months of development since the last feature release and is the work
of 198 contributors spread over 1041 pull requests. It contains a large
number of exciting new features as well as changes to both the Python
and C APIs.

This major release includes breaking changes that could not happen in a
regular minor (feature) release - including an ABI break, changes to
type promotion rules, and API changes which may not have been emitting
deprecation warnings in 1.26.x. Key documents related to how to adapt to
changes in NumPy 2.0, in addition to these release notes, include:

Highlights

Highlights of this release include:

  • New features:
    • A new variable-length string dtype, numpy.dtypes.StringDType and a new
      numpy.strings namespace with performant ufuncs for string operations,
    • Support for float32 and longdouble in all
      numpy.fft functions,
    • Support for the array API standard in the main numpy
      namespace.
  • Performance improvements:
    • Sorting functions sort, argsort,
      partition, argpartition have been
      accelerated through the use of the Intel x86-simd-sort and
      Google Highway libraries, and may see large (hardware-specific)
      speedups,
    • macOS Accelerate support and binary wheels for macOS >=14, with
      significant performance improvements for linear algebra
      operations on macOS, and wheels that are about 3 times smaller,
    • numpy.char fixed-length string operations have
      been accelerated by implementing ufuncs that also support
      numpy.dtypes.StringDType in addition to the
      fixed-length string dtypes,
    • A new tracing and introspection API,
      numpy.lib.introspect.opt_func_info, to determine
      which hardware-specific kernels are available and will be
      dispatched to.
  • Python API improvements:
    • A clear split between public and private API, with a new module
      structure and each public function now available in a single place.
    • Many removals of non-recommended functions and aliases. This
      should make it easier to learn and use NumPy. The number of
      objects in the main namespace decreased by ~10% and in
      numpy.lib by ~80%.
    • Canonical dtype names and a new numpy.isdtype` introspection
      function,
  • C API improvements:
    • A new public C API for creating custom dtypes,
    • Many outdated functions and macros removed, and private
      internals hidden to ease future extensibility,
    • New, easier to use, initialization functions: PyArray_ImportNumPyAPI
      and PyUFunc_ImportUFuncAPI.
  • Improved behavior:
    • Improvements to type promotion behavior was changed by adopting NEP 50.
      This fixes many user surprises about promotions which previously often
      depended on data values of input arrays rather than only their dtypes.
      Please see the NEP and the numpy-2-migration-guide for details as this
      change can lead to changes in output dtypes and lower precision results
      for mixed-dtype operations.
    • The default integer type on Windows is now int64 rather than
      int32, matching the behavior on other platforms,
    • The maximum number of array dimensions is changed from 32 to 64
  • Documentation:
    • The reference guide navigation was significantly improved, and
      there is now documentation on NumPy's
      module structure,
    • The building from source documentation was completely rewritten,

Furthermore there are many changes to NumPy internals, including
continuing to migrate code from C to C++, that will make it easier to
improve and maintain NumPy in the future.

The "no free lunch" theorem dictates that there is a price to pay for
all these API and behavior improvements and better future extensibility.
This price is:

  1. Backwards compatibility. There are a significant number of breaking
    changes to both the Python and C APIs. In the majority of cases,
    there are clear error messages that will inform the user how to
    adapt their code. However, there are also changes in behavior for
    which it was not possible to give such an error message - these
    cases are all covered in the Deprecation and Compatibility sections
    below, and in the numpy-2-migration-guide.

    Note that there is a ruff mode to auto-fix many things in Python
    code.

  2. Breaking changes to the NumPy ABI. As a result, binaries of packages
    that use the NumPy C API and were built against a NumPy 1.xx release
    will not work with NumPy 2.0. On import, such packages will see an
    ImportError with a message about binary incompatibility.

    It is possible to build binaries against NumPy 2.0 that will work at
    runtime with both NumPy 2.0 and 1.x. See numpy-2-abi-handling for more
    details.

    All downstream packages that depend on the NumPy ABI are advised
    to do a new release built against NumPy 2.0 and verify that that
    release works with both 2.0 and 1.26 - ideally in the period between
    2.0.0rc1 (which will be ABI-stable) and the final 2.0.0 release to
    avoid problems for their users.

The Python versions supported by this release are 3.9-3.12.

NumPy 2.0 Python API removals

  • np.geterrobj, np.seterrobj and the related ufunc keyword
    argument extobj= have been removed. The preferred replacement for
    all of these is using the context manager with np.errstate():.

    (gh-23922)

  • np.cast has been removed. The literal replacement for
    np.cast[dtype](arg) is np.asarray(arg, dtype=dtype).

  • np.source has been removed. The preferred replacement is
    inspect.getsource.

  • np.lookfor has been removed.

    (gh-24144)

  • numpy.who has been removed. As an alternative for the removed
    functionality, one can use a variable explorer that is available in
    IDEs such as Spyder or Jupyter Notebook.

    (gh-24321)

  • Multiple niche enums, expired members and functions have been
    removed from the main namespace, such as: ERR_*, SHIFT_*,
    np.fastCopyAndTranspose, np.kernel_version, np.numarray,
    np.oldnumeric and np.set_numeric_ops.

    (gh-24316)

  • Replaced from ... import * in the numpy/__init__.py with
    explicit imports. As a result, these main namespace members got
    removed: np.FLOATING_POINT_SUPPORT, np.FPE_*, np.NINF,
    np.PINF, np.NZERO, np.PZERO, np.CLIP, np.WRAP, np.WRAP,
    np.RAISE, np.BUFSIZE, np.UFUNC_BUFSIZE_DEFAULT,
    np.UFUNC_PYVALS_NAME, np.ALLOW_THREADS, np.MAXDIMS,
    np.MAY_SHARE_EXACT, np.MAY_SHARE_BOUNDS, add_newdoc,
    np.add_docstring and np.add_newdoc_ufunc.

    (gh-24357)

  • Alias np.float_ has been removed. Use np.float64 instead.

  • Alias np.complex_ has been removed. Use np.complex128 instead.

  • Alias np.longfloat has been removed. Use np.longdouble instead.

  • Alias np.singlecomplex has been removed. Use np.complex64
    instead.

  • Alias np.cfloat has been removed. Use np.complex128 instead.

  • Alias np.longcomplex has been removed. Use np.clongdouble
    instead.

  • Alias np.clongfloat has been removed. Use np.clongdouble
    instead.

  • Alias np.string_ has been removed. Use np.bytes_ instead.

  • Alias np.unicode_ has been removed. Use np.str_ instead.

  • Alias np.Inf has been removed. Use np.inf instead.

  • Alias np.Infinity has been removed. Use np.inf instead.

  • Alias np.NaN has been removed. Use np.nan instead.

  • Alias np.infty has been removed. Use np.inf instead.

  • Alias np.mat has been removed. Use np.asmatrix instead.

  • np.issubclass_ has been removed. Use the issubclass builtin
    instead.

  • np.asfarray has been removed. Use np.asarray with a proper dtype
    instead.

  • np.set_string_function has been removed. Use np.set_printoptions
    instead with a formatter for custom printing of NumPy objects.

  • np.tracemalloc_domain is now only available from np.lib.

  • np.recfromcsv and recfromtxt are now only available from
    np.lib.npyio.

  • np.issctype, np.maximum_sctype, np.obj2sctype,
    np.sctype2char, np.sctypes, np.issubsctype were all removed
    from the main namespace without replacement, as they where niche
    members.

  • Deprecated np.deprecate and np.deprecate_with_doc has been
    removed from the main namespace. Use DeprecationWarning instead.

  • Deprecated np.safe_eval has been removed from the main namespace.
    Use ast.literal_eval instead.

    (gh-24376)

  • np.find_common_type has been removed. Use numpy.promote_types or
    numpy.result_type instead. To achieve semantics for the
    scalar_types argument, use numpy.result_type and pass 0,
    0.0, or 0j as a Python scalar instead.

  • np.round_ has been removed. Use np.round instead.

  • np.nbytes has been removed. Use np.dtype(<dtype>).itemsize
    instead.

    (gh-24477)

  • np.compare_chararrays has been removed from the main namespace.
    Use np.char.compare_chararrays instead.

  • The charrarray in the main namespace has been deprecated. It can
    be imported without a deprecation warning from np.char.chararray
    for now, but we are planning to fully deprecate and remove
    chararray in the future.

  • np.format_parser has been removed from the main namespace. Use
    np.rec.format_parser instead.

    (gh-24587)

  • Support for seven data type string aliases has been removed from
    np.dtype: int0, uint0, void0, object0, str0, bytes0
    and bool8.

    (gh-24807)

  • The experimental numpy.array_api submodule has been removed. Use
    the main numpy namespace for regular usage instead, or the
    separate array-api-strict package for the compliance testing use
    case for which numpy.array_api was mostly used.

    (gh-25911)

__array_prepare__ is removed

UFuncs called __array_prepare__ before running computations for normal
ufunc calls (not generalized ufuncs, reductions, etc.). The function was
also called instead of __array_wrap__ on the results of some linear
algebra functions.

It is now removed. If you use it, migrate to __array_ufunc__ or rely
on __array_wrap__ which is called with a context in all cases,
although only after the result array is filled. In those code paths,
__array_wrap__ will now be passed a base class, rather than a subclass
array.

(gh-25105)

Deprecations

  • np.compat has been deprecated, as Python 2 is no longer supported.

  • np.safe_eval has been deprecated. ast.literal_eval should be
    used instead.

    (gh-23830)

  • np.recfromcsv, np.recfromtxt, np.disp, np.get_array_wrap,
    np.maximum_sctype, np.deprecate and np.deprecate_with_doc have
    been deprecated.

    (gh-24154)

  • np.trapz has been deprecated. Use np.trapezoid or a
    scipy.integrate function instead.

  • np.in1d has been deprecated. Use np.isin instead.

  • Alias np.row_stack has been deprecated. Use np.vstack directly.

    (gh-24445)

  • __array_wrap__ is now passed arr, context, return_scalar and
    support for implementations not accepting all three are deprecated.
    Its signature should be
    __array_wrap__(self, arr, context=None, return_scalar=False)

    (gh-25408)

  • Arrays of 2-dimensional vectors for np.cross have been deprecated.
    Use arrays of 3-dimensional vectors instead.

    (gh-24818)

  • np.dtype("a") alias for np.dtype(np.bytes_) was deprecated. Use
    np.dtype("S") alias instead.

    (gh-24854)

  • Use of keyword arguments x and y with functions
    assert_array_equal and assert_array_almost_equal has been
    deprecated. Pass the first two arguments as positional arguments
    instead.

    (gh-24978)

numpy.fft deprecations for n-D transforms with None values in arguments

Using fftn, ifftn, rfftn, irfftn, fft2, ifft2, rfft2 or
irfft2 with the s parameter set to a value that is not None and
the axes parameter set to None has been deprecated, in line with the
array API standard. To retain current behaviour, pass a sequence [0,
..., k-1] to axes for an array of dimension k.

Furthermore, passing an array to s which contains None values is
deprecated as the parameter is documented to accept a sequence of
integers in both the NumPy docs and the array API specification. To use
the default behaviour of the corresponding 1-D transform, pass the value
matching the default for its n parameter. To use the default behaviour
for every axis, the s argument can be omitted.

(gh-25495)

np.linalg.lstsq now defaults to a new rcond value

numpy.linalg.lstsq now uses the new rcond value of the
machine precision times max(M, N). Previously, the machine precision
was used but a FutureWarning was given to notify that this change will
happen eventually. That old behavior can still be achieved by passing
rcond=-1.

(gh-25721)

Expired deprecations

  • The np.core.umath_tests submodule has been removed from the public
    API. (Deprecated in NumPy 1.15)

    (gh-23809)

  • The PyDataMem_SetEventHook deprecation has expired and it is
    removed. Use tracemalloc and the np.lib.tracemalloc_domain
    domain. (Deprecated in NumPy 1.23)

    (gh-23921)

  • The deprecation of set_numeric_ops and the C functions
    PyArray_SetNumericOps and PyArray_GetNumericOps has been expired
    and the functions removed. (Deprecated in NumPy 1.16)

    (gh-23998)

  • The fasttake, fastclip, and fastputmask ArrFuncs deprecation
    is now finalized.

  • The deprecated function fastCopyAndTranspose and its C counterpart
    are now removed.

  • The deprecation of PyArray_ScalarFromObject is now finalized.

    (gh-24312)

  • np.msort has been removed. For a replacement, np.sort(a, axis=0)
    should be used instead.

    (gh-24494)

  • np.dtype(("f8", 1) will now return a shape 1 subarray dtype rather
    than a non-subarray one.

    (gh-25761)

  • Assigning to the .data attribute of an ndarray is disallowed and
    will raise.

  • np.binary_repr(a, width) will raise if width is too small.

  • Using NPY_CHAR in PyArray_DescrFromType() will raise, use
    NPY_STRING NPY_UNICODE, or NPY_VSTRING instead.

    (gh-25794)

Compatibility notes

loadtxt and genfromtxt default encoding changed

loadtxt and genfromtxt now both default to encoding=None which may
mainly modify how converters work. These will now be passed str
rather than bytes. Pass the encoding explicitly to always get the new
or old behavior. For genfromtxt the change also means that returned
values will now be unicode strings rather than bytes.

(gh-25158)

f2py compatibility notes

  • f2py will no longer accept ambiguous -m and .pyf CLI
    combinations. When more than one .pyf file is passed, an error is
    raised. When both -m and a .pyf is passed, a warning is emitted
    and the -m provided name is ignored.

    (gh-25181)

  • The f2py.compile() helper has been removed because it leaked
    memory, has been marked as experimental for several years now, and
    was implemented as a thin subprocess.run wrapper. It was also one
    of the test bottlenecks. See
    gh-25122 for the full
    rationale. It also used several np.distutils features which are
    too fragile to be ported to work with meson.

  • Users are urged to replace calls to f2py.compile with calls to
    subprocess.run("python", "-m", "numpy.f2py",... instead, and to
    use environment variables to interact with meson. Native
    files
    are also an
    option.

    (gh-25193)

Minor changes in behavior of sorting functions

Due to algorithmic changes and use of SIMD code, sorting functions with
methods that aren't stable may return slightly different results in
2.0.0 compared to 1.26.x. This includes the default method of
numpy.argsort and numpy.argpartition.

Removed ambiguity when broadcasting in np.solve

The broadcasting rules for np.solve(a, b) were ambiguous when b had
1 fewer dimensions than a. This has been resolved in a
backward-incompatible way and is now compliant with the Array API. The
old behaviour can be reconstructed by using
np.solve(a, b[..., None])[..., 0].

(gh-25914)

Modified representation for Polynomial

The representation method for
numpy.polynomial.polynomial.Polynomial was updated to
include the domain in the representation. The plain text and latex
representations are now consistent. For example the output of
str(np.polynomial.Polynomial([1, 1], domain=[.1, .2])) used to be
1.0 + 1.0 x, but now is 1.0 + 1.0 (-3.0000000000000004 + 20.0 x).

(gh-21760)

C API changes

  • The PyArray_CGT, PyArray_CLT, PyArray_CGE, PyArray_CLE,
    PyArray_CEQ, PyArray_CNE macros have been removed.

  • PyArray_MIN and PyArray_MAX have been moved from
    ndarraytypes.h to npy_math.h.

    (gh-24258)

  • A C API for working with numpy.dtypes.StringDType
    arrays has been exposed. This includes functions for acquiring and
    releasing mutexes which lock access to the string data, as well as
    packing and unpacking UTF-8 bytestreams from array entries.

  • NPY_NTYPES has been renamed to NPY_NTYPES_LEGACY as it does not
    include new NumPy built-in DTypes. In particular the new string
    DType will likely not work correctly with code that handles legacy
    DTypes.

    (gh-25347)

  • The C-API now only exports the static inline function versions of
    the array accessors (previously this depended on using "deprecated
    API"). While we discourage it, the struct fields can still be used
    directly.

    (gh-25789)

  • NumPy now defines PyArray_Pack to set an individual memory address.
    Unlike PyArray_SETITEM this function is equivalent to setting an
    individual array item and does not require a NumPy array input.

    (gh-25954)

  • The ->f slot has been removed from PyArray_Descr. If you use this slot,
    replace accessing it with PyDataType_GetArrFuncs (see its documentation
    and the numpy-2-migration-guide). In some cases using other functions
    like PyArray_GETITEM may be an alternatives.

  • PyArray_GETITEM and PyArray_SETITEM now require the import of
    the NumPy API table to be used and are no longer defined in
    ndarraytypes.h.

    (gh-25812)

  • Due to runtime dependencies, the definition for functionality
    accessing the dtype flags was moved from numpy/ndarraytypes.h and
    is only available after including numpy/ndarrayobject.h as it
    requires import_array(). This includes PyDataType_FLAGCHK,
    PyDataType_REFCHK and NPY_BEGIN_THREADS_DESCR.

  • The dtype flags on PyArray_Descr must now be accessed through the
    PyDataType_FLAGS inline function to be compatible with both 1.x
    and 2.x. This function is defined in npy_2_compat.h to allow
    backporting. Most or all users should use PyDataType_FLAGCHK which
    is available on 1.x and does not require backporting. Cython users
    should use Cython 3. Otherwise access will go through Python unless
    they use PyDataType_FLAGCHK instead.

    (gh-25816)

Datetime functionality exposed in the C API and Cython bindings

The functions NpyDatetime_ConvertDatetime64ToDatetimeStruct,
NpyDatetime_ConvertDatetimeStructToDatetime64,
NpyDatetime_ConvertPyDateTimeToDatetimeStruct,
NpyDatetime_GetDatetimeISO8601StrLen,
NpyDatetime_MakeISO8601Datetime, and
NpyDatetime_ParseISO8601Datetime have been added to the C API to
facilitate converting between strings, Python datetimes, and NumPy
datetimes in external libraries.

(gh-21199)

Const correctness for the generalized ufunc C API

The NumPy C API's functions for constructing generalized ufuncs
(PyUFunc_FromFuncAndData, PyUFunc_FromFuncAndDataAndSignature,
PyUFunc_FromFuncAndDataAndSignatureAndIdentity) take types and
data arguments that are not modified by NumPy's internals. Like the
name and doc arguments, third-party Python extension modules are
likely to supply these arguments from static constants. The types and
data arguments are now const-correct: they are declared as
const char *types and void *const *data, respectively. C code should
not be affected, but C++ code may be.

(gh-23847)

Larger NPY_MAXDIMS and NPY_MAXARGS, NPY_RAVEL_AXIS introduced

NPY_MAXDIMS is now 64, you may want to review its use. This is usually
used in a stack allocation, where the increase should be safe. However,
we do encourage generally to remove any use of NPY_MAXDIMS and
NPY_MAXARGS to eventually allow removing the constraint completely.
For the conversion helper and C-API functions mirroring Python ones such as
take, NPY_MAXDIMS was used to mean axis=None. Such usage must be replaced
with NPY_RAVEL_AXIS. See also migration_maxdims.

(gh-25149)

NPY_MAXARGS not constant and PyArrayMultiIterObject size change

Since NPY_MAXARGS was increased, it is now a runtime constant and not
compile-time constant anymore. We expect almost no users to notice this.
But if used for stack allocations it now must be replaced with a custom
constant using NPY_MAXARGS as an additional runtime check.

The sizeof(PyArrayMultiIterObject) no longer includes the full size of
the object. We expect nobody to notice this change. It was necessary to
avoid issues with Cython.

(gh-25271)

Required changes for custom legacy user dtypes

In order to improve our DTypes it is unfortunately necessary to break
the ABI, which requires some changes for dtypes registered with
PyArray_RegisterDataType. Please see the documentation of
PyArray_RegisterDataType for how to adapt your code and achieve
compatibility with both 1.x and 2.x.

(gh-25792)

New Public DType API

The C implementation of the NEP 42 DType API is now public. While the
DType API has shipped in NumPy for a few versions, it was only usable in
sessions with a special environment variable set. It is now possible to
write custom DTypes outside of NumPy using the new DType API and the
normal import_array() mechanism for importing the numpy C API.

See dtype-api for more details about the API. As always with a new feature,
please report any bugs you run into implementing or using a new DType. It is
likely that downstream C code that works with dtypes will need to be updated to
work correctly with new DTypes.

(gh-25754)

New C-API import functions

We have now added PyArray_ImportNumPyAPI and PyUFunc_ImportUFuncAPI
as static inline functions to import the NumPy C-API tables. The new
functions have two advantages over import_array and import_ufunc:

  • They check whether the import was already performed and are
    light-weight if not, allowing to add them judiciously (although this
    is not preferable in most cases).
  • The old mechanisms were macros rather than functions which included
    a return statement.

The PyArray_ImportNumPyAPI() function is included in npy_2_compat.h
for simpler backporting.

(gh-25866)

Structured dtype information access through functions

The dtype structures fields c_metadata, names, fields, and
subarray must now be accessed through new functions following the same
names, such as PyDataType_NAMES. Direct access of the fields is not
valid as they do not exist for all PyArray_Descr instances. The
metadata field is kept, but the macro version should also be
preferred.

(gh-25802)

Descriptor elsize and alignment access

Unless compiling only with NumPy 2 support, the elsize and aligment
fields must now be accessed via PyDataType_ELSIZE,
PyDataType_SET_ELSIZE, and PyDataType_ALIGNMENT. In cases where the
descriptor is attached to an array, we advise using PyArray_ITEMSIZE
as it exists on all NumPy versions. Please see
migration_c_descr for more information.

(gh-25943)

NumPy 2.0 C API removals

  • npy_interrupt.h and the corresponding macros like NPY_SIGINT_ON
    have been removed. We recommend querying PyErr_CheckSignals() or
    PyOS_InterruptOccurred() periodically (these do currently require
    holding the GIL though).

  • The noprefix.h header has been removed. Replace missing symbols
    with their prefixed counterparts (usually an added NPY_ or
    npy_).

    (gh-23919)

  • PyUFunc_GetPyVals, PyUFunc_handlefperr, and PyUFunc_checkfperr
    have been removed. If needed, a new backwards compatible function to
    raise floating point errors could be restored. Reason for removal:
    there are no known users and the functions would have made
    with np.errstate() fixes much more difficult).

    (gh-23922)

  • The numpy/old_defines.h which was part of the API deprecated since
    NumPy 1.7 has been removed. This removes macros of the form
    PyArray_CONSTANT. The
    replace_old_macros.sed
    script may be useful to convert them to the NPY_CONSTANT version.

    (gh-24011)

  • The legacy_inner_loop_selector member of the ufunc struct is
    removed to simplify improvements to the dispatching system. There
    are no known users overriding or directly accessing this member.

    (gh-24271)

  • NPY_INTPLTR has been removed to avoid confusion (see intp
    redefinition).

    (gh-24888)

  • The advanced indexing MapIter and related API has been removed.
    The (truly) public part of it was not well tested and had only one
    known user (Theano). Making it private will simplify improvements to
    speed up ufunc.at, make advanced indexing more maintainable, and
    was important for increasing the maximum number of dimensions of
    arrays to 64. Please let us know if this API is important to you so
    we can find a solution together.

    (gh-25138)

  • The NPY_MAX_ELSIZE macro has been removed, as it only ever
    reflected builtin numeric types and served no internal purpose.

    (gh-25149)

  • PyArray_REFCNT and NPY_REFCOUNT are removed. Use Py_REFCNT
    instead.

    (gh-25156)

  • PyArrayFlags_Type and PyArray_NewFlagsObject as well as
    PyArrayFlagsObject are private now. There is no known use-case;
    use the Python API if needed.

  • PyArray_MoveInto, PyArray_CastTo, PyArray_CastAnyTo are
    removed use PyArray_CopyInto and if absolutely needed
    PyArray_CopyAnyInto (the latter does a flat copy).

  • PyArray_FillObjectArray is removed, its only true use was for
    implementing np.empty. Create a new empty array or use
    PyArray_FillWithScalar() (decrefs existing objects).

  • PyArray_CompareUCS4 and PyArray_CompareString are removed. Use
    the standard C string comparison functions.

  • PyArray_ISPYTHON is removed as it is misleading, has no known
    use-cases, and is easy to replace.

  • PyArray_FieldNames is removed, as it is unclear what it would be
    useful for. It also has incorrect semantics in some possible
    use-cases.

  • PyArray_TypestrConvert is removed, since it seems a misnomer and
    unlikely to be used by anyone. If you know the size or are limited
    to few types, just use it explicitly, otherwise go via Python
    strings.

    (gh-25292)

  • PyDataType_GetDatetimeMetaData is removed, it did not actually do
    anything since at least NumPy 1.7.

    (gh-25802)

  • PyArray_GetCastFunc is removed. Note that custom legacy user
    dtypes can still provide a castfunc as their implementation, but any
    access to them is now removed. The reason for this is that NumPy
    never used these internally for many years. If you use simple
    numeric types, please just use C casts directly. In case you require
    an alternative, please let us know so we can create new API such as
    PyArray_CastBuffer() which could use old or new cast functions
    depending on the NumPy version.

    (gh-25161)

New Features

np.add was extended to work with unicode and bytes dtypes.

(gh-24858)

A new bitwise_count function

This new function counts the number of 1-bits in a number.
numpy.bitwise_count works on all the numpy integer types
and integer-like objects.

>>> a = np.array([2**i - 1 for i in range(16)])
>>> np.bitwise_count(a)
array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15],
      dtype=uint8)

(gh-19355)

macOS Accelerate support, including the ILP64

Support for the updated Accelerate BLAS/LAPACK library, including ILP64
(64-bit integer) support, in macOS 13.3 has been added. This brings
arm64 support, and significant performance improvements of up to 10x for
commonly used linear algebra operations. When Accelerate is selected at
build time, or if no explicit BLAS library selection is done, the 13.3+
version will automatically be used if available.

(gh-24053)

Binary wheels are also available. On macOS >=14.0, users who install
NumPy from PyPI will get wheels built against Accelerate rather than
OpenBLAS.

(gh-25255)

Option to use weights for quantile and percentile functions

A weights keyword is now available for numpy.quantile, numpy.percentile,
numpy.nanquantile and numpy.nanpercentile. Only method="inverted_cdf"
supports weights.

(gh-24254)

Improved CPU optimization tracking

A new tracer mechanism is available which enables tracking of the
enabled targets for each optimized function (i.e., that uses
hardware-specific SIMD instructions) in the NumPy library. With this
enhancement, it becomes possible to precisely monitor the enabled CPU
dispatch targets for the dispatched functions.

A new function named opt_func_info has been added to the new namespace
numpy.lib.introspect, offering this tracing capability. This function allows
you to retrieve information about the enabled targets based on function names
and data type signatures.

(gh-24420)

A new Meson backend for f2py

f2py in compile mode (i.e. f2py -c) now accepts the
--backend meson option. This is the default option for Python >=3.12.
For older Python versions, f2py will still default to
--backend distutils.

To support this in realistic use-cases, in compile mode f2py takes a
--dep flag one or many times which maps to dependency() calls in the
meson backend, and does nothing in the distutils backend.

There are no changes for users of f2py only as a code generator, i.e.
without -c.

(gh-24532)

bind(c) support for f2py

Both functions and subroutines can be annotated with bind(c). f2py
will handle both the correct type mapping, and preserve the unique label
for other C interfaces.

Note: bind(c, name = 'routine_name_other_than_fortran_routine') is
not honored by the f2py bindings by design, since bind(c) with the
name is meant to guarantee only the same name in C and Fortran, not in
Python and Fortran.

(gh-24555)

A new strict option for several testing functions

The strict keyword is now available for numpy.testing.assert_allclose,
numpy.testing.assert_equal, and numpy.testing.assert_array_less. Setting
strict=True will disable the broadcasting behaviour for scalars and ensure
that input arrays have the same data type.

(gh-24680,
gh-24770,
gh-24775)

Add np.core.umath.find and np.core.umath.rfind UFuncs

Add two find and rfind UFuncs that operate on unicode or byte
strings and are used in np.char. They operate similar to str.find
and str.rfind.

(gh-24868)

diagonal and trace for numpy.linalg

numpy.linalg.diagonal and numpy.linalg.trace have been added, which are
array API standard-compatible variants of numpy.diagonal and numpy.trace.
They differ in the default axis selection which define 2-D sub-arrays.

(gh-24887)

New long and ulong dtypes

numpy.long and numpy.ulong have been added as NumPy integers mapping to
C's long and unsigned long. Prior to NumPy 1.24, numpy.long was an alias
to Python's int.

(gh-24922)

svdvals for numpy.linalg

numpy.linalg.svdvals has been added. It computes singular values for (a stack
of) matrices. Executing np.svdvals(x) is the same as calling np.svd(x, compute_uv=False, hermitian=False). This function is compatible with the array
API standard.

(gh-24940)

A new isdtype function

numpy.isdtype was added to provide a canonical way to classify NumPy's
dtypes in compliance with the array API standard.

(gh-25054)

A new astype function

numpy.astype was added to provide an array API standard-compatible
alternative to the numpy.ndarray.astype method.

(gh-25079)

Array API compatible functions' aliases

13 aliases for existing functions were added to improve compatibility
with the array API standard:

  • Trigonometry: acos, acosh, asin, asinh, atan, atanh,
    atan2.
  • Bitwise: bitwise_left_shift, bitwise_invert,
    bitwise_right_shift.
  • Misc: concat, permute_dims, pow.
  • In numpy.linalg: tensordot, matmul.

(gh-25086)

New unique_* functions

The numpy.unique_all, numpy.unique_counts, numpy.unique_inverse, and
numpy.unique_values functions have been added. They provide functionality of
numpy.unique with different sets of flags. They are array API
standard-compatible, and because the number of arrays they return does not
depend on the values of input arguments, they are easier to target for JIT
compilation.

(gh-25088)

Matrix transpose support for ndarrays

NumPy now offers support for calculating the matrix transpose of an
array (or stack of arrays). The matrix transpose is equivalent to
swapping the last two axes of an array. Both np.ndarray and
np.ma.MaskedArray now expose a .mT attribute, and there is a
matching new numpy.matrix_transpose function.

(gh-23762)

Array API compatible functions for numpy.linalg

Six new functions and two aliases were added to improve compatibility
with the Array API standard for `numpy.linalg`:

  • numpy.linalg.matrix_norm - Computes the matrix norm of
    a matrix (or a stack of matrices).

  • numpy.linalg.vector_norm - Computes the vector norm of
    a vector (or batch of vectors).

  • numpy.vecdot - Computes the (vector) dot product of
    two arrays.

  • numpy.linalg.vecdot - An alias for
    numpy.vecdot.

  • numpy.linalg.matrix_transpose - An alias for
    numpy.matrix_transpose.

    (gh-25155)

  • numpy.linalg.outer has been added. It computes the
    outer product of two vectors. It differs from
    numpy.outer by accepting one-dimensional arrays only.
    This function is compatible with the array API standard.

    (gh-25101)

  • numpy.linalg.cross has been added. It computes the
    cross product of two (arrays of) 3-dimensional vectors. It differs
    from numpy.cross by accepting three-dimensional
    vectors only. This function is compatible with the array API
    standard.

    (gh-25145)

A correction argument for var and std

A correction argument was added to numpy.var and numpy.std, which is an
array API standard compatible alternative to ddof. As both arguments serve a
similar purpose, only one of them can be provided at the same time.

(gh-25169)

ndarray.device and ndarray.to_device

An ndarray.device attribute and ndarray.to_device method were added
to numpy.ndarray for array API standard compatibility.

Additionally, device keyword-only arguments were added to:
numpy.asarray, numpy.arange, numpy.empty, numpy.empty_like,
numpy.eye, numpy.full, numpy.full_like, numpy.linspace, numpy.ones,
numpy.ones_like, numpy.zeros, and numpy.zeros_like.

For all these new arguments, only device="cpu" is supported.

(gh-25233)

StringDType has been added to NumPy

We have added a new variable-width UTF-8 encoded string data type, implementing
a "NumPy array of Python strings", including support for a user-provided
missing data sentinel. It is intended as a drop-in replacement for arrays of
Python strings and missing data sentinels using the object dtype. See
NEP 55 and the documentation
of stringdtype for more details.

(gh-25347)

New keywords for cholesky and pinv

The upper and rtol keywords were added to
numpy.linalg.cholesky and numpy.linalg.pinv,
respectively, to improve array API standard compatibility.

For numpy.linalg.pinv, if neither rcond nor rtol is
specified, the rcond's default is used. We plan to deprecate and
remove rcond in the future.

(gh-25388)

New keywords for sort, argsort and linalg.matrix_rank

New keyword parameters were added to improve array API standard
compatibility:

  • rtol was added to numpy.linalg.matrix_rank.
  • stable was added to numpy.sort and
    numpy.argsort.

(gh-25437)

New numpy.strings namespace for string ufuncs

NumPy now implements some string operations as ufuncs. The old np.char
namespace is still available, and where possible the string manipulation
functions in that namespace have been updated to use the new ufuncs,
substantially improving their performance.

Where possible, we suggest updating code to use functions in
np.strings instead of np.char. In the future we may deprecate
np.char in favor of np.strings.

(gh-25463)

numpy.fft support for different precisions and in-place calculations

The various FFT routines in numpy.fft now do their
calculations natively in float, double, or long double precision,
depending on the input precision, instead of always calculating in
double precision. Hence, the calculation will now be less precise for
single and more precise for long double precision. The data type of the
output array will now be adjusted accordingly.

Furthermore, all FFT routines have gained an out argument that can be
used for in-place calculations.

(gh-25536)

configtool and pkg-config support

A new numpy-config CLI script is available that can be queried for the
NumPy version and for compile flags needed to use the NumPy C API. This
will allow build systems to better support the use of NumPy as a
dependency. Also, a numpy.pc pkg-config file is now included with
Numpy. In order to find its location for use with PKG_CONFIG_PATH, use
numpy-config --pkgconfigdir.

(gh-25730)

Array API standard support in the main namespace

The main numpy namespace now supports the array API standard. See
array-api-standard-compatibility for
details.

(gh-25911)

Improvements

Strings are now supported by any, all, and the logical ufuncs.

(gh-25651)

Integer sequences as the shape argument for memmap

numpy.memmap can now be created with any integer sequence
as the shape argument, such as a list or numpy array of integers.
Previously, only the types of tuple and int could be used without
raising an error.

(gh-23729)

errstate is now faster and context safe

The numpy.errstate context manager/decorator is now faster
and safer. Previously, it was not context safe and had (rare) issues
with thread-safety.

(gh-23936)

AArch64 quicksort speed improved by using Highway's VQSort

The first introduction of the Google Highway library, using VQSort on
AArch64. Execution time is improved by up to 16x in some cases, see the
PR for benchmark results. Extensions to other platforms will be done in
the future.

(gh-24018)

Complex types - underlying C type changes

  • The underlying C types for all of NumPy's complex types have been
    changed to use C99 complex types.

  • While this change does not affect the memory layout of complex
    types, it changes the API to be used to directly retrieve or write
    the real or complex part of the complex number, since direct field
    access (as in c.real or c.imag) is no longer an option. You can
    now use utilities provided in numpy/npy_math.h to do these
    operations, like this:

    npy_cdouble c;
    npy_csetreal(&c, 1.0);
    npy_csetimag(&c, 0.0);
    printf("%d + %di\n", npy_creal(c), npy_cimag(c));
    
  • To ease cross-version compatibility, equivalent macros and a
    compatibility layer have been added which can be used by downstream
    packages to continue to support both NumPy 1.x and 2.x. See
    complex-numbers for more info.

  • numpy/npy_common.h now includes complex.h, which means that
    complex is now a reserved keyword.

(gh-24085)

iso_c_binding support and improved common blocks for f2py

Previously, users would have to define their own custom f2cmap file to
use type mappings defined by the Fortran2003 iso_c_binding intrinsic
module. These type maps are now natively supported by f2py

(gh-24555)

f2py now handles common blocks which have kind specifications from
modules. This further expands the usability of intrinsics like
iso_fortran_env and iso_c_binding.

(gh-25186)

Call str automatically on third argument to functions like assert_equal

The third argument to functions like
numpy.testing.assert_equal now has str called on it
automatically. This way it mimics the built-in assert statement, where
assert_equal(a, b, obj) works like assert a == b, obj.

(gh-24877)

Support for array-like atol/rtol in isclose, allclose

The keywords atol and rtol in numpy.isclose and
numpy.allclose now accept both scalars and arrays. An
array, if given, must broadcast to the shapes of the first two array
arguments.

(gh-24878)

Consistent failure messages in test functions

Previously, some numpy.testing assertions printed messages
that referred to the actual and desired results as x and y. Now,
these values are consistently referred to as ACTUAL and DESIRED.

(gh-24931)

n-D FFT transforms allow s[i] == -1

The numpy.fft.fftn, numpy.fft.ifftn,
numpy.fft.rfftn, numpy.fft.irfftn,
numpy.fft.fft2, numpy.fft.ifft2,
numpy.fft.rfft2 and numpy.fft.irfft2
functions now use the whole input array along the axis i if
s[i] == -1, in line with the array API standard.

(gh-25495)

Guard PyArrayScalar_VAL and PyUnicodeScalarObject for the limited API

PyUnicodeScalarObject holds a PyUnicodeObject, which is not
available when using Py_LIMITED_API. Add guards to hide it and
consequently also make the PyArrayScalar_VAL macro hidden.

(gh-25531)

Changes

  • np.gradient() now returns a tuple rather than a list making the
    return value immutable.

    (gh-23861)

  • Being fully context and thread-safe, np.errstate can only be
    entered once now.

  • np.setbufsize is now tied to np.errstate(): leaving an
    np.errstate context will also reset the bufsize.

    (gh-23936)

  • A new public np.lib.array_utils submodule has been introduced and
    it currently contains three functions: byte_bounds (moved from
    np.lib.utils), normalize_axis_tuple and normalize_axis_index.

    (gh-24540)

  • Introduce numpy.bool as the new canonical name for
    NumPy's boolean dtype, and make numpy.bool\_ an alias
    to it. Note that until NumPy 1.24, np.bool was an alias to
    Python's builtin bool. The new name helps with array API standard
    compatibility and is a more intuitive name.

    (gh-25080)

  • The dtype.flags value was previously stored as a signed integer.
    This means that the aligned dtype struct flag lead to negative flags
    being set (-128 rather than 128). This flag is now stored unsigned
    (positive). Code which checks flags manually may need to adapt. This
    may include code compiled with Cython 0.29.x.

    (gh-25816)

Representation of NumPy scalars changed

As per NEP 51, the scalar representation has been updated to include the type
information to avoid confusion with Python scalars.

Scalars are now printed as np.float64(3.0) rather than just 3.0.
This may disrupt workflows that store representations of numbers (e.g.,
to files) making it harder to read them. They should be stored as
explicit strings, for example by using str() or f"{scalar!s}". For
the time being, affected users can use
np.set_printoptions(legacy="1.25") to get the old behavior (with
possibly a few exceptions). Documentation of downstream projects may
require larger updates, if code snippets are tested. We are working on
tooling for
doctest-plus
to facilitate updates.

(gh-22449)

Truthiness of NumPy strings changed

NumPy strings previously were inconsistent about how they defined if the
string is True or False and the definition did not match the one
used by Python. Strings are now considered True when they are
non-empty and False when they are empty. This changes the following
distinct cases:

  • Casts from string to boolean were previously roughly equivalent to
    string_array.astype(np.int64).astype(bool), meaning that only
    valid integers could be cast. Now a string of "0" will be
    considered True since it is not empty. If you need the old
    behavior, you may use the above step (casting to integer first) or
    string_array == "0" (if the input is only ever 0 or 1). To get
    the new result on old NumPy versions use string_array != "".
  • np.nonzero(string_array) previously ignored whitespace so that a
    string only containing whitespace was considered False. Whitespace
    is now considered True.

This change does not affect np.loadtxt, np.fromstring, or
np.genfromtxt. The first two still use the integer definition, while
genfromtxt continues to match for "true" (ignoring case). However,
if np.bool_ is used as a converter the result will change.

The change does affect np.fromregex as it uses direct assignments.

(gh-23871)

A mean keyword was added to var and std function

Often when the standard deviation is needed the mean is also needed. The
same holds for the variance and the mean. Until now the mean is then
calculated twice, the change introduced here for the numpy.var and
numpy.std functions allows for passing in a precalculated mean as an keyword
argument. See the docstrings for details and an example illustrating the
speed-up.

(gh-24126)

Remove datetime64 deprecation warning when constructing with timezone

The numpy.datetime64 method now issues a UserWarning rather than a
DeprecationWarning whenever a timezone is included in the datetime string that
is provided.

(gh-24193)

Default integer dtype is now 64-bit on 64-bit Windows

The default NumPy integer is now 64-bit on all 64-bit systems as the
historic 32-bit default on Windows was a common source of issues. Most
users should not notice this. The main issues may occur with code
interfacing with libraries written in a compiled language like C. For
more information see migration_windows_int64.

(gh-24224)

Renamed numpy.core to numpy._core

Accessing numpy.core now emits a DeprecationWarning. In practice we
have found that most downstream usage of numpy.core was to access
functionality that is available in the main numpy namespace. If for
some reason you are using functionality in numpy.core that is not
available in the main numpy namespace, this means you are likely using
private NumPy internals. You can still access these internals via
numpy._core without a deprecation warning but we do not provide any
backward compatibility guarantees for NumPy internals. Please open an
issue if you think a mistake was made and something needs to be made
public.

(gh-24634)

The "relaxed strides" debug build option, which was previously enabled
through the NPY_RELAXED_STRIDES_DEBUG environment variable or the
-Drelaxed-strides-debug config-settings flag has been removed.

(gh-24717)

Redefinition of np.intp/np.uintp (almost never a change)

Due to the actual use of these types almost always matching the use of
size_t/Py_ssize_t this is now the definition in C. Previously, it
matched intptr_t and uintptr_t which would often have been subtly
incorrect. This has no effect on the vast majority of machines since the
size of these types only differ on extremely niche platforms.

However, it means that:

  • Pointers may not necessarily fit into an intp typed array anymore.
    The p and P character codes can still be used, however.
  • Creating intptr_t or uintptr_t typed arrays in C remains
    possible in a cross-platform way via PyArray_DescrFromType('p').
  • The new character codes nN were introduced.
  • It is now correct to use the Python C-API functions when parsing to
    npy_intp typed arguments.

(gh-24888)

numpy.fft.helper made private

numpy.fft.helper was renamed to numpy.fft._helper to indicate that
it is a private submodule. All public functions exported by it should be
accessed from numpy.fft.

(gh-24945)

numpy.linalg.linalg made private

numpy.linalg.linalg was renamed to numpy.linalg._linalg to indicate
that it is a private submodule. All public functions exported by it
should be accessed from numpy.linalg.

(gh-24946)

Out-of-bound axis not the same as axis=None

In some cases axis=32 or for concatenate any large value was the same
as axis=None. Except for concatenate this was deprecate. Any out of
bound axis value will now error, make sure to use axis=None.

(gh-25149)

New copy keyword meaning for array and asarray constructors

Now numpy.array and numpy.asarray support
three values for copy parameter:

  • None - A copy will only be made if it is necessary.
  • True - Always make a copy.
  • False - Never make a copy. If a copy is required a ValueError is
    raised.

The meaning of False changed as it now raises an exception if a copy
is needed.

(gh-25168)

The __array__ special method now takes a copy keyword argument.

NumPy will pass copy to the __array__ special method in situations
where it would be set to a non-default value (e.g. in a call to
np.asarray(some_object, copy=False)). Currently, if an unexpected
keyword argument error is raised after this, NumPy will print a warning
and re-try without the copy keyword argument. Implementations of
objects implementing the __array__ protocol should accept a copy
keyword argument with the same meaning as when passed to
numpy.array or numpy.asarray.

(gh-25168)

Cleanup of initialization of numpy.dtype with strings with commas

The interpretation of strings with commas is changed slightly, in that a
trailing comma will now always create a structured dtype. E.g., where
previously np.dtype("i") and np.dtype("i,") were treated as
identical, now np.dtype("i,") will create a structured dtype, with a
single field. This is analogous to np.dtype("i,i") creating a
structured dtype with two fields, and makes the behaviour consistent
with that expected of tuples.

At the same time, the use of single number surrounded by parenthesis to
indicate a sub-array shape, like in np.dtype("(2)i,"), is deprecated.
Instead; one should use np.dtype("(2,)i") or np.dtype("2i").
Eventually, using a number in parentheses will raise an exception, like
is the case for initializations without a comma, like
np.dtype("(2)i").

(gh-25434)

Change in how complex sign is calculated

Following the array API standard, the complex sign is now calculated as
z / |z| (instead of the rather less logical case where the sign of the
real part was taken, unless the real part was zero, in which case the
sign of the imaginary part was returned). Like for real numbers, zero is
returned if z==0.

(gh-25441)

Return types of functions that returned a list of arrays

Functions that returned a list of ndarrays have been changed to return a
tuple of ndarrays instead. Returning tuples consistently whenever a
sequence of arrays is returned makes it easier for JIT compilers like
Numba, as well as for static type checkers in some cases, to support
these functions. Changed functions are: numpy.atleast_1d, numpy.atleast_2d,
numpy.atleast_3d, numpy.broadcast_arrays, numpy.meshgrid,
numpy.ogrid, numpy.histogramdd.

np.unique return_inverse shape for multi-dimensional inputs

When multi-dimensional inputs are passed to np.unique with
return_inverse=True, the unique_inverse output is now shaped such
that the input can be reconstructed directly using
np.take(unique, unique_inverse) when axis=None, and
np.take_along_axis(unique, unique_inverse, axis=axis) otherwise.

(gh-25553,
gh-25570)

any and all return booleans for object arrays

The any and all functions and methods now return booleans also for
object arrays. Previously, they did a reduction which behaved like the
Python or and and operators which evaluates to one of the arguments.
You can use np.logical_or.reduce and np.logical_and.reduce to
achieve the previous behavior.

(gh-25712)

np.can_cast cannot be called on Python int, float, or complex

np.can_cast cannot be called with Python int, float, or complex
instances anymore. This is because NEP 50 means that the result of
can_cast must not depend on the value passed in. Unfortunately, for
Python scalars whether a cast should be considered "same_kind" or
"safe" may depend on the context and value so that this is currently
not implemented. In some cases, this means you may have to add a
specific path for: if type(obj) in (int, float, complex): ....

(gh-26393)

Checksums

MD5

68918d8a47bdb8032d3c29ba0b7aa922  numpy-2.0.0rc2-cp310-cp310-macosx_10_9_x86_64.whl
28ef21e0db45a843901d5ecb203004f3  numpy-2.0.0rc2-cp310-cp310-macosx_11_0_arm64.whl
b0fbed65410612a81da2610887fcce7a  numpy-2.0.0rc2-cp310-cp310-macosx_14_0_arm64.whl
0e263a8bb87d32496e6de1555b6de0d7  numpy-2.0.0rc2-cp310-cp310-macosx_14_0_x86_64.whl
3700463b63c17514a42540f75f97e109  numpy-2.0.0rc2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
69c0e5b2a6054cee4cef3cfadf5bfc68  numpy-2.0.0rc2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
8b6547f02d1fb76a3436900146509476  numpy-2.0.0rc2-cp310-cp310-musllinux_1_1_aarch64.whl
85008275bc2ebb5d540ec89d20f95d72  numpy-2.0.0rc2-cp310-cp310-musllinux_1_1_x86_64.whl
46d1b93d2f2a6985d6440e010fe231a6  numpy-2.0.0rc2-cp310-cp310-win32.whl
df23c9ab080e695009e6c9dfc5c9dfee  numpy-2.0.0rc2-cp310-cp310-win_amd64.whl
4f4ac0bbff2152b95851f720be6e04ff  numpy-2.0.0rc2-cp311-cp311-macosx_10_9_x86_64.whl
df05a737d40018381c465e083fda65ba  numpy-2.0.0rc2-cp311-cp311-macosx_11_0_arm64.whl
9f3bbbce699559418b713f24bac5fd12  numpy-2.0.0rc2-cp311-cp311-macosx_14_0_arm64.whl
ced25c7ad09b414f941584582c52ce54  numpy-2.0.0rc2-cp311-cp311-macosx_14_0_x86_64.whl
b3af5409624e6aafb31107bd52bb8448  numpy-2.0.0rc2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
2859530bd0234983dadaa51b44a09daf  numpy-2.0.0rc2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
de6b8fe89c20bd85652679bb4a4671ef  numpy-2.0.0rc2-cp311-cp311-musllinux_1_1_aarch64.whl
2f0f3fed01479ee14a05aa1fc960d33a  numpy-2.0.0rc2-cp311-cp311-musllinux_1_1_x86_64.whl
0542e8d87c48155e1c8534e2a39f5e7a  numpy-2.0.0rc2-cp311-cp311-win32.whl
b7f451c340e92eb3d8b31ea5390f7340  numpy-2.0.0rc2-cp311-cp311-win_amd64.whl
f41d4e26c72340801d6f2bb609edba46  numpy-2.0.0rc2-cp312-cp312-macosx_10_9_x86_64.whl
1f8b24cc5b3006d778651e9ca9f7ed8c  numpy-2.0.0rc2-cp312-cp312-macosx_11_0_arm64.whl
5fd09e2e0fcb38fddac7b3ef1807ed82  numpy-2.0.0rc2-cp312-cp312-macosx_14_0_arm64.whl
f6eca0f2a9c770f6c6a4ba551ad7e237  numpy-2.0.0rc2-cp312-cp312-macosx_14_0_x86_64.whl
21b03eca64e88b952d843a70185e4144  numpy-2.0.0rc2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
f7631a072b83fc080662c3f435ba6fd4  numpy-2.0.0rc2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
2a62e6cffd78fd3d35c9142d4c214c00  numpy-2.0.0rc2-cp312-cp312-musllinux_1_1_aarch64.whl
25467c8e576bbc140bafe38f3b1fdd60  numpy-2.0.0rc2-cp312-cp312-musllinux_1_1_x86_64.whl
b7d74f54199d7fa355ec4abc3f2cafff  numpy-2.0.0rc2-cp312-cp312-win32.whl
351eb69f9e0e69b06d13a8c03733e5e6  numpy-2.0.0rc2-cp312-cp312-win_amd64.whl
c774b6e40b62f0503788cd7042bf85a1  numpy-2.0.0rc2-cp39-cp39-macosx_10_9_x86_64.whl
ef664eaadd0796fbc37fc3cc0c498c2e  numpy-2.0.0rc2-cp39-cp39-macosx_11_0_arm64.whl
f9a1d24dbeaa6433b827d82b9622b04b  numpy-2.0.0rc2-cp39-cp39-macosx_14_0_arm64.whl
8ea2a873c471a5180d8a316c14abb09f  numpy-2.0.0rc2-cp39-cp39-macosx_14_0_x86_64.whl
dce70c212e9c321ca189867f7ebc8e03  numpy-2.0.0rc2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
feacd9a21c6de648e8117bc1cc36fcc5  numpy-2.0.0rc2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
cd34c2b0f9e25d80d2c4bd70717d565b  numpy-2.0.0rc2-cp39-cp39-musllinux_1_1_aarch64.whl
c1efda069b8c8826a6ba6d7a49ada148  numpy-2.0.0rc2-cp39-cp39-musllinux_1_1_x86_64.whl
4ef25fd7e575fa64d4c4e9dfdc1c9174  numpy-2.0.0rc2-cp39-cp39-win32.whl
d35cd476de68374a10d56737a882e735  numpy-2.0.0rc2-cp39-cp39-win_amd64.whl
b83c7ccda03ec1a1fec900c149bdc90d  numpy-2.0.0rc2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
0aff6e5f70e2d9fa299e3895294bd7a8  numpy-2.0.0rc2-pp39-pypy39_pp73-macosx_14_0_x86_64.whl
dd1c5bf6559fe41b21c81097e97232c3  numpy-2.0.0rc2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
ecab2eae88f6ba9421787655909045b7  numpy-2.0.0rc2-pp39-pypy39_pp73-win_amd64.whl
884d0fe28f77f07a3d51ba905ffdf0d3  numpy-2.0.0rc2.tar.gz

SHA256

53286933bf3be7a13459c7a7885ce0935aff56fe0baf280f0e6d80e75cc3ee3c  numpy-2.0.0rc2-cp310-cp310-macosx_10_9_x86_64.whl
2bc615498fce8e15b99c1b4d7e018ffebf7bd1a288665b3b916357bdf6725d6a  numpy-2.0.0rc2-cp310-cp310-macosx_11_0_arm64.whl
159d9c21a2989afdfebb638f60268becbc3da07eb224d9221a7c37255216feb6  numpy-2.0.0rc2-cp310-cp310-macosx_14_0_arm64.whl
c58bc6aac83175dcfa02a0ef92b7a7fff5a0420014202f052a9af6214684e6ac  numpy-2.0.0rc2-cp310-cp310-macosx_14_0_x86_64.whl
9b07a5c460941ae5ef8cde51c04b635af58abbbd55387ad6257dbdfda043290a  numpy-2.0.0rc2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
0a49e876be11b4409eb3120841c7d2dba1f63549224f85fa4ab7ee83288c3b41  numpy-2.0.0rc2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
951164e9919664a3e5e605715809173b47f14329b586e24ec05e66ae516ce11b  numpy-2.0.0rc2-cp310-cp310-musllinux_1_1_aarch64.whl
201c0e05854d25f16b15851380c07d61aab34eef76a2acf1c3fcc4bda0879b0b  numpy-2.0.0rc2-cp310-cp310-musllinux_1_1_x86_64.whl
800ff28d0da25fca3f843c19035005b73c76350be7c6fa6061c8fcdd248aced9  numpy-2.0.0rc2-cp310-cp310-win32.whl
2a9a5ee4b090af548a1019bb76b53b02cb37f09dc002386349ee5e79ff54c40e  numpy-2.0.0rc2-cp310-cp310-win_amd64.whl
6d23b0db1fd4ad8225fd32f39036b07a5052398929a5af5291379bceac49d95a  numpy-2.0.0rc2-cp311-cp311-macosx_10_9_x86_64.whl
a99ac361ddb0ef14894c3e7405aa98ffdfe6d0101b9f4a2e931f3912f3b43085  numpy-2.0.0rc2-cp311-cp311-macosx_11_0_arm64.whl
6aba1c147f69ee1fb8afb44e93178e92d2aa9a3bf5374b6f1cb53ee1cae1376d  numpy-2.0.0rc2-cp311-cp311-macosx_14_0_arm64.whl
4f3a4c676ab4ce211e5886cb16cc282e9e18b352b2b1427bbb4c104f9d80f12a  numpy-2.0.0rc2-cp311-cp311-macosx_14_0_x86_64.whl
12d3bf0cac2aec23e10b6927ee063aa6cf7ca8deba1d3c5702faa0ea5cfb8049  numpy-2.0.0rc2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
a44b0ebf7ef61c289a33c76247874177c446083c5236c7e7e0595350883e0424  numpy-2.0.0rc2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
0e146557fdede5a7434a788648e62a9e87db8c6e05136a92483e2c2180ad4bab  numpy-2.0.0rc2-cp311-cp311-musllinux_1_1_aarch64.whl
01ac116e2f053f283ac5292fcd146f8f223d4b6cd343beab341748818692a2de  numpy-2.0.0rc2-cp311-cp311-musllinux_1_1_x86_64.whl
74dcc392725837896532ec7d65506cbeaecee237871b36ae813521bc3e2c40ed  numpy-2.0.0rc2-cp311-cp311-win32.whl
225c2b3303eb2ebf745ab954ef8723cd60f64d926edd73dc963141538ddc48ed  numpy-2.0.0rc2-cp311-cp311-win_amd64.whl
32207294f21331ae0d7fd33dc9324447a8117d5af15a0895f39af3441d4af70e  numpy-2.0.0rc2-cp312-cp312-macosx_10_9_x86_64.whl
a666cc3d55f301b86edc7f1eaef10ffa1f79206c4b196a1f2649f91c8a1b49b6  numpy-2.0.0rc2-cp312-cp312-macosx_11_0_arm64.whl
fa5485c565ca222ba69c5fe04ebd8a89f884615466d74e0856e03fff873bcc43  numpy-2.0.0rc2-cp312-cp312-macosx_14_0_arm64.whl
2202abe3e8afb2b88102a75f1beb888f380c09d40898db0f1df5d847623701d5  numpy-2.0.0rc2-cp312-cp312-macosx_14_0_x86_64.whl
6b93d6b401db67948a4997e2c45e958df65b98b1a9183e96e96e491f9fb3c2fe  numpy-2.0.0rc2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
1691e64c838d33fdba59ac7043144194f8f847b5fec6f47ecd9e117418cc9bdc  numpy-2.0.0rc2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
7288d8ac70be23ff29df8da51840aad8f7acd9120d27cd7a61488b96bc5ad68b  numpy-2.0.0rc2-cp312-cp312-musllinux_1_1_aarch64.whl
9dd61b79856aed44f818fffe1555fa7ef8f6ffa5b5211cde473e2e33f7a5bd92  numpy-2.0.0rc2-cp312-cp312-musllinux_1_1_x86_64.whl
83c76a11c5e5a343fb1cb87afec147d6bebac91758c9c9f01d2c692ae4750e27  numpy-2.0.0rc2-cp312-cp312-win32.whl
24bcf0cdd31debdcb80e1f3bb7dba224c9a93a66f48ff1b1df2cb9a53eede944  numpy-2.0.0rc2-cp312-cp312-win_amd64.whl
87172a69d7eafb00ea1b734dba9ffebb474505082078ec2d95b99918f14a0a0e  numpy-2.0.0rc2-cp39-cp39-macosx_10_9_x86_64.whl
e13a1fa60a471b79a53de8abb87e1e0ad53e6899edee8a29b4db3edccee53d65  numpy-2.0.0rc2-cp39-cp39-macosx_11_0_arm64.whl
32725b717f902e7243d270e50ff9487a499820233b57c3e71b33f65a84707e38  numpy-2.0.0rc2-cp39-cp39-macosx_14_0_arm64.whl
f8c7012dd6779f078e3f42e19a2204275abe4d68a80dc807a97caf42e825d9c3  numpy-2.0.0rc2-cp39-cp39-macosx_14_0_x86_64.whl
a0202e282ec9d45fc6ddb85777fddeea1107fe4555be50dd22d044e7fe01860c  numpy-2.0.0rc2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
5262d69981502ded9b397c3fd5a20a1f2c91a66b21325ddff5e6d88486eee6fa  numpy-2.0.0rc2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
6fe254c271f8ce4c2e60250f8ee80684abd2be748af84312a05b7614c3ae3b8d  numpy-2.0.0rc2-cp39-cp39-musllinux_1_1_aarch64.whl
0a2cf839a7d6cc0b854ba81cdfee96aad2c7e4d558c7e23ca82d08e4f7d7daa7  numpy-2.0.0rc2-cp39-cp39-musllinux_1_1_x86_64.whl
9ea90fb601d5ac32ff7f9f0a3bf7ccab5971a0196364b9429734bd270cd2fa67  numpy-2.0.0rc2-cp39-cp39-win32.whl
9e00367261ee0347208a8bcc355b6470b084cb777c45141e098328b67b02c98b  numpy-2.0.0rc2-cp39-cp39-win_amd64.whl
da6ab9dab471668155e0b208ab710417a7407397794a88b3ccbece5bcf10091d  numpy-2.0.0rc2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
b3ba5f436c6de9b8829f231e9eb9e394aa819efce9eab697cd4e558b0b8c6cc8  numpy-2.0.0rc2-pp39-pypy39_pp73-macosx_14_0_x86_64.whl
d5211fd4e126699b16b8573eef007f25afb9459d966b35430908798b24298e3b  numpy-2.0.0rc2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
0d5cfbf693408cf1ee72d79d36d51f7b63f5e46a5e9cf12f63d4ed07c0f876e0  numpy-2.0.0rc2-pp39-pypy39_pp73-win_amd64.whl
868e9edbee689d6fdb7957c0b790de2b2123e6feff5d66045d10760c521f2c00  numpy-2.0.0rc2.tar.gz
numpy -

Published by charris 7 months ago

NumPy 2.0.0 Release Notes

Note

The release of 2.0 is in progress and the current release overview and
highlights are still in a draft state. However, the highlights should
already list the most significant changes detailed in the full notes
below, and those full notes should be complete (if not copy-edited well
enough yet).

NumPy 2.0.0 is the first major release since 2006. It is the result of
10 months of development since the last feature release and is the work
of 193 contributors spread over 1006 pull requests. It contains a large
number of exciting new features as well as changes to both the Python
and C APIs.

This major release includes breaking changes that could not happen in a
regular minor (feature) release - including an ABI break, changes to
type promotion rules, and API changes which may not have been emitting
deprecation warnings in 1.26.x. Key documents related to how to adapt to
changes in NumPy 2.0, in addition to these release notes, include:

Highlights

Highlights of this release include:

  • New features:
    • A new variable-length string dtype, numpy.dtypes.StringDType and a new
      numpy.strings namespace with performant ufuncs for string operations,
    • Support for float32 and longdouble in all
      numpy.fft functions,
    • Support for the array API standard in the main numpy
      namespace.
  • Performance improvements:
    • Sorting functions sort, argsort,
      partition, argpartition have been
      accelerated through the use of the Intel x86-simd-sort and
      Google Highway libraries, and may see large (hardware-specific)
      speedups,
    • macOS Accelerate support and binary wheels for macOS >=14, with
      significant performance improvements for linear algebra
      operations on macOS, and wheels that are about 3 times smaller,
    • numpy.char fixed-length string operations have
      been accelerated by implementing ufuncs that also support
      numpy.dtypes.StringDType in addition to the
      fixed-length string dtypes,
    • A new tracing and introspection API,
      numpy.lib.introspect.opt_func_info, to determine
      which hardware-specific kernels are available and will be
      dispatched to.
  • Python API improvements:
    • A clear split between public and private API, with a new module
      structure and each public function now available in a single place.
    • Many removals of non-recommended functions and aliases. This
      should make it easier to learn and use NumPy. The number of
      objects in the main namespace decreased by ~10% and in
      numpy.lib by ~80%.
    • Canonical dtype names and a new numpy.isdtype` introspection
      function,
  • C API improvements:
    • A new public C API for creating custom dtypes,
    • Many outdated functions and macros removed, and private
      internals hidden to ease future extensibility,
    • New, easier to use, initialization functions: PyArray_ImportNumPyAPI
      and PyUFunc_ImportUFuncAPI.
  • Improved behavior:
    • Improvements to type promotion behavior was changed by adopting NEP 50.
      This fixes many user surprises about promotions which previously often
      depended on data values of input arrays rather than only their dtypes.
      Please see the NEP and the numpy-2-migration-guide for details as this
      change can lead to changes in output dtypes and lower precision results
      for mixed-dtype operations.
    • The default integer type on Windows is now int64 rather than
      int32, matching the behavior on other platforms,
    • The maximum number of array dimensions is changed from 32 to 64
  • Documentation:
    • The reference guide navigation was significantly improved, and
      there is now documentation on NumPy's
      module structure,
    • The building from source documentation was completely rewritten,

Furthermore there are many changes to NumPy internals, including
continuing to migrate code from C to C++, that will make it easier to
improve and maintain NumPy in the future.

The "no free lunch" theorem dictates that there is a price to pay for
all these API and behavior improvements and better future extensibility.
This price is:

  1. Backwards compatibility. There are a significant number of breaking
    changes to both the Python and C APIs. In the majority of cases,
    there are clear error messages that will inform the user how to
    adapt their code. However, there are also changes in behavior for
    which it was not possible to give such an error message - these
    cases are all covered in the Deprecation and Compatibility sections
    below, and in the numpy-2-migration-guide.

    Note that there is a ruff mode to auto-fix many things in Python
    code.

  2. Breaking changes to the NumPy ABI. As a result, binaries of packages
    that use the NumPy C API and were built against a NumPy 1.xx release
    will not work with NumPy 2.0. On import, such packages will see an
    ImportError with a message about binary incompatibility.

    It is possible to build binaries against NumPy 2.0 that will work at
    runtime with both NumPy 2.0 and 1.x. See numpy-2-abi-handling for more
    details.

    All downstream packages that depend on the NumPy ABI are advised
    to do a new release built against NumPy 2.0 and verify that that
    release works with both 2.0 and 1.26 - ideally in the period between
    2.0.0rc1 (which will be ABI-stable) and the final 2.0.0 release to
    avoid problems for their users.

The Python versions supported by this release are 3.9-3.12.

NumPy 2.0 Python API removals

  • np.geterrobj, np.seterrobj and the related ufunc keyword
    argument extobj= have been removed. The preferred replacement for
    all of these is using the context manager with np.errstate():.

    (gh-23922)

  • np.cast has been removed. The literal replacement for
    np.cast[dtype](arg) is np.asarray(arg, dtype=dtype).

  • np.source has been removed. The preferred replacement is
    inspect.getsource.

  • np.lookfor has been removed.

    (gh-24144)

  • numpy.who has been removed. As an alternative for the removed
    functionality, one can use a variable explorer that is available in
    IDEs such as Spyder or Jupyter Notebook.

    (gh-24321)

  • Multiple niche enums, expired members and functions have been
    removed from the main namespace, such as: ERR_*, SHIFT_*,
    np.fastCopyAndTranspose, np.kernel_version, np.numarray,
    np.oldnumeric and np.set_numeric_ops.

    (gh-24316)

  • Replaced from ... import * in the numpy/__init__.py with
    explicit imports. As a result, these main namespace members got
    removed: np.FLOATING_POINT_SUPPORT, np.FPE_*, np.NINF,
    np.PINF, np.NZERO, np.PZERO, np.CLIP, np.WRAP, np.WRAP,
    np.RAISE, np.BUFSIZE, np.UFUNC_BUFSIZE_DEFAULT,
    np.UFUNC_PYVALS_NAME, np.ALLOW_THREADS, np.MAXDIMS,
    np.MAY_SHARE_EXACT, np.MAY_SHARE_BOUNDS, add_newdoc,
    np.add_docstring and np.add_newdoc_ufunc.

    (gh-24357)

  • Alias np.float_ has been removed. Use np.float64 instead.

  • Alias np.complex_ has been removed. Use np.complex128 instead.

  • Alias np.longfloat has been removed. Use np.longdouble instead.

  • Alias np.singlecomplex has been removed. Use np.complex64
    instead.

  • Alias np.cfloat has been removed. Use np.complex128 instead.

  • Alias np.longcomplex has been removed. Use np.clongdouble
    instead.

  • Alias np.clongfloat has been removed. Use np.clongdouble
    instead.

  • Alias np.string_ has been removed. Use np.bytes_ instead.

  • Alias np.unicode_ has been removed. Use np.str_ instead.

  • Alias np.Inf has been removed. Use np.inf instead.

  • Alias np.Infinity has been removed. Use np.inf instead.

  • Alias np.NaN has been removed. Use np.nan instead.

  • Alias np.infty has been removed. Use np.inf instead.

  • Alias np.mat has been removed. Use np.asmatrix instead.

  • np.issubclass_ has been removed. Use the issubclass builtin
    instead.

  • np.asfarray has been removed. Use np.asarray with a proper dtype
    instead.

  • np.set_string_function has been removed. Use np.set_printoptions
    instead with a formatter for custom printing of NumPy objects.

  • np.tracemalloc_domain is now only available from np.lib.

  • np.recfromcsv and recfromtxt are now only available from
    np.lib.npyio.

  • np.issctype, np.maximum_sctype, np.obj2sctype,
    np.sctype2char, np.sctypes, np.issubsctype were all removed
    from the main namespace without replacement, as they where niche
    members.

  • Deprecated np.deprecate and np.deprecate_with_doc has been
    removed from the main namespace. Use DeprecationWarning instead.

  • Deprecated np.safe_eval has been removed from the main namespace.
    Use ast.literal_eval instead.

    (gh-24376)

  • np.find_common_type has been removed. Use numpy.promote_types or
    numpy.result_type instead. To achieve semantics for the
    scalar_types argument, use numpy.result_type and pass 0,
    0.0, or 0j as a Python scalar instead.

  • np.round_ has been removed. Use np.round instead.

  • np.nbytes has been removed. Use np.dtype(<dtype>).itemsize
    instead.

    (gh-24477)

  • np.compare_chararrays has been removed from the main namespace.
    Use np.char.compare_chararrays instead.

  • The charrarray in the main namespace has been deprecated. It can
    be imported without a deprecation warning from np.char.chararray
    for now, but we are planning to fully deprecate and remove
    chararray in the future.

  • np.format_parser has been removed from the main namespace. Use
    np.rec.format_parser instead.

    (gh-24587)

  • Support for seven data type string aliases has been removed from
    np.dtype: int0, uint0, void0, object0, str0, bytes0
    and bool8.

    (gh-24807)

  • The experimental numpy.array_api submodule has been removed. Use
    the main numpy namespace for regular usage instead, or the
    separate array-api-strict package for the compliance testing use
    case for which numpy.array_api was mostly used.

    (gh-25911)

__array_prepare__ is removed

UFuncs called __array_prepare__ before running computations for normal
ufunc calls (not generalized ufuncs, reductions, etc.). The function was
also called instead of __array_wrap__ on the results of some linear
algebra functions.

It is now removed. If you use it, migrate to __array_ufunc__ or rely
on __array_wrap__ which is called with a context in all cases,
although only after the result array is filled. In those code paths,
__array_wrap__ will now be passed a base class, rather than a subclass
array.

(gh-25105)

Deprecations

  • np.compat has been deprecated, as Python 2 is no longer supported.

  • np.safe_eval has been deprecated. ast.literal_eval should be
    used instead.

    (gh-23830)

  • np.recfromcsv, np.recfromtxt, np.disp, np.get_array_wrap,
    np.maximum_sctype, np.deprecate and np.deprecate_with_doc have
    been deprecated.

    (gh-24154)

  • np.trapz has been deprecated. Use np.trapezoid or a
    scipy.integrate function instead.

  • np.in1d has been deprecated. Use np.isin instead.

  • Alias np.row_stack has been deprecated. Use np.vstack directly.

    (gh-24445)

  • __array_wrap__ is now passed arr, context, return_scalar and
    support for implementations not accepting all three are deprecated.
    Its signature should be
    __array_wrap__(self, arr, context=None, return_scalar=False)

    (gh-25408)

  • Arrays of 2-dimensional vectors for np.cross have been deprecated.
    Use arrays of 3-dimensional vectors instead.

    (gh-24818)

  • np.dtype("a") alias for np.dtype(np.bytes_) was deprecated. Use
    np.dtype("S") alias instead.

    (gh-24854)

  • Use of keyword arguments x and y with functions
    assert_array_equal and assert_array_almost_equal has been
    deprecated. Pass the first two arguments as positional arguments
    instead.

    (gh-24978)

numpy.fft deprecations for n-D transforms with None values in arguments

Using fftn, ifftn, rfftn, irfftn, fft2, ifft2, rfft2 or
irfft2 with the s parameter set to a value that is not None and
the axes parameter set to None has been deprecated, in line with the
array API standard. To retain current behaviour, pass a sequence [0,
..., k-1] to axes for an array of dimension k.

Furthermore, passing an array to s which contains None values is
deprecated as the parameter is documented to accept a sequence of
integers in both the NumPy docs and the array API specification. To use
the default behaviour of the corresponding 1-D transform, pass the value
matching the default for its n parameter. To use the default behaviour
for every axis, the s argument can be omitted.

(gh-25495)

np.linalg.lstsq now defaults to a new rcond value

numpy.linalg.lstsq now uses the new rcond value of the
machine precision times max(M, N). Previously, the machine precision
was used but a FutureWarning was given to notify that this change will
happen eventually. That old behavior can still be achieved by passing
rcond=-1.

(gh-25721)

Expired deprecations

  • The np.core.umath_tests submodule has been removed from the public
    API. (Deprecated in NumPy 1.15)

    (gh-23809)

  • The PyDataMem_SetEventHook deprecation has expired and it is
    removed. Use tracemalloc and the np.lib.tracemalloc_domain
    domain. (Deprecated in NumPy 1.23)

    (gh-23921)

  • The deprecation of set_numeric_ops and the C functions
    PyArray_SetNumericOps and PyArray_GetNumericOps has been expired
    and the functions removed. (Deprecated in NumPy 1.16)

    (gh-23998)

  • The fasttake, fastclip, and fastputmask ArrFuncs deprecation
    is now finalized.

  • The deprecated function fastCopyAndTranspose and its C counterpart
    are now removed.

  • The deprecation of PyArray_ScalarFromObject is now finalized.

    (gh-24312)

  • np.msort has been removed. For a replacement, np.sort(a, axis=0)
    should be used instead.

    (gh-24494)

  • np.dtype(("f8", 1) will now return a shape 1 subarray dtype rather
    than a non-subarray one.

    (gh-25761)

  • Assigning to the .data attribute of an ndarray is disallowed and
    will raise.

  • np.binary_repr(a, width) will raise if width is too small.

  • Using NPY_CHAR in PyArray_DescrFromType() will raise, use
    NPY_STRING NPY_UNICODE, or NPY_VSTRING instead.

    (gh-25794)

Compatibility notes

loadtxt and genfromtxt default encoding changed

loadtxt and genfromtxt now both default to encoding=None which may
mainly modify how converters work. These will now be passed str
rather than bytes. Pass the encoding explicitly to always get the new
or old behavior. For genfromtxt the change also means that returned
values will now be unicode strings rather than bytes.

(gh-25158)

f2py compatibility notes

  • f2py will no longer accept ambiguous -m and .pyf CLI
    combinations. When more than one .pyf file is passed, an error is
    raised. When both -m and a .pyf is passed, a warning is emitted
    and the -m provided name is ignored.

    (gh-25181)

  • The f2py.compile() helper has been removed because it leaked
    memory, has been marked as experimental for several years now, and
    was implemented as a thin subprocess.run wrapper. It was also one
    of the test bottlenecks. See
    gh-25122 for the full
    rationale. It also used several np.distutils features which are
    too fragile to be ported to work with meson.

  • Users are urged to replace calls to f2py.compile with calls to
    subprocess.run("python", "-m", "numpy.f2py",... instead, and to
    use environment variables to interact with meson. Native
    files
    are also an
    option.

    (gh-25193)

Minor changes in behavior of sorting functions

Due to algorithmic changes and use of SIMD code, sorting functions with
methods that aren't stable may return slightly different results in
2.0.0 compared to 1.26.x. This includes the default method of
numpy.argsort and numpy.argpartition.

Removed ambiguity when broadcasting in np.solve

The broadcasting rules for np.solve(a, b) were ambiguous when b had
1 fewer dimensions than a. This has been resolved in a
backward-incompatible way and is now compliant with the Array API. The
old behaviour can be reconstructed by using
np.solve(a, b[..., None])[..., 0].

(gh-25914)

Modified representation for Polynomial

The representation method for
numpy.polynomial.polynomial.Polynomial was updated to
include the domain in the representation. The plain text and latex
representations are now consistent. For example the output of
str(np.polynomial.Polynomial([1, 1], domain=[.1, .2])) used to be
1.0 + 1.0 x, but now is 1.0 + 1.0 (-3.0000000000000004 + 20.0 x).

(gh-21760)

C API changes

  • The PyArray_CGT, PyArray_CLT, PyArray_CGE, PyArray_CLE,
    PyArray_CEQ, PyArray_CNE macros have been removed.

  • PyArray_MIN and PyArray_MAX have been moved from
    ndarraytypes.h to npy_math.h.

    (gh-24258)

  • A C API for working with numpy.dtypes.StringDType
    arrays has been exposed. This includes functions for acquiring and
    releasing mutexes which lock access to the string data, as well as
    packing and unpacking UTF-8 bytestreams from array entries.

  • NPY_NTYPES has been renamed to NPY_NTYPES_LEGACY as it does not
    include new NumPy built-in DTypes. In particular the new string
    DType will likely not work correctly with code that handles legacy
    DTypes.

    (gh-25347)

  • The C-API now only exports the static inline function versions of
    the array accessors (previously this depended on using "deprecated
    API"). While we discourage it, the struct fields can still be used
    directly.

    (gh-25789)

  • NumPy now defines PyArray_Pack to set an individual memory address.
    Unlike PyArray_SETITEM this function is equivalent to setting an
    individual array item and does not require a NumPy array input.

    (gh-25954)

  • The ->f slot has been removed from PyArray_Descr. If you use this slot,
    replace accessing it with PyDataType_GetArrFuncs (see its documentation
    and the numpy-2-migration-guide). In some cases using other functions
    like PyArray_GETITEM may be an alternatives.

  • PyArray_GETITEM and PyArray_SETITEM now require the import of
    the NumPy API table to be used and are no longer defined in
    ndarraytypes.h.

    (gh-25812)

  • Due to runtime dependencies, the definition for functionality
    accessing the dtype flags was moved from numpy/ndarraytypes.h and
    is only available after including numpy/ndarrayobject.h as it
    requires import_array(). This includes PyDataType_FLAGCHK,
    PyDataType_REFCHK and NPY_BEGIN_THREADS_DESCR.

  • The dtype flags on PyArray_Descr must now be accessed through the
    PyDataType_FLAGS inline function to be compatible with both 1.x
    and 2.x. This function is defined in npy_2_compat.h to allow
    backporting. Most or all users should use PyDataType_FLAGCHK which
    is available on 1.x and does not require backporting. Cython users
    should use Cython 3. Otherwise access will go through Python unless
    they use PyDataType_FLAGCHK instead.

    (gh-25816)

Datetime functionality exposed in the C API and Cython bindings

The functions NpyDatetime_ConvertDatetime64ToDatetimeStruct,
NpyDatetime_ConvertDatetimeStructToDatetime64,
NpyDatetime_ConvertPyDateTimeToDatetimeStruct,
NpyDatetime_GetDatetimeISO8601StrLen,
NpyDatetime_MakeISO8601Datetime, and
NpyDatetime_ParseISO8601Datetime have been added to the C API to
facilitate converting between strings, Python datetimes, and NumPy
datetimes in external libraries.

(gh-21199)

Const correctness for the generalized ufunc C API

The NumPy C API's functions for constructing generalized ufuncs
(PyUFunc_FromFuncAndData, PyUFunc_FromFuncAndDataAndSignature,
PyUFunc_FromFuncAndDataAndSignatureAndIdentity) take types and
data arguments that are not modified by NumPy's internals. Like the
name and doc arguments, third-party Python extension modules are
likely to supply these arguments from static constants. The types and
data arguments are now const-correct: they are declared as
const char *types and void *const *data, respectively. C code should
not be affected, but C++ code may be.

(gh-23847)

Larger NPY_MAXDIMS and NPY_MAXARGS, NPY_RAVEL_AXIS introduced

NPY_MAXDIMS is now 64, you may want to review its use. This is usually
used in a stack allocation, where the increase should be safe. However,
we do encourage generally to remove any use of NPY_MAXDIMS and
NPY_MAXARGS to eventually allow removing the constraint completely.
For the conversion helper and C-API functions mirroring Python ones such as
take, NPY_MAXDIMS was used to mean axis=None. Such usage must be replaced
with NPY_RAVEL_AXIS. See also migration_maxdims.

(gh-25149)

NPY_MAXARGS not constant and PyArrayMultiIterObject size change

Since NPY_MAXARGS was increased, it is now a runtime constant and not
compile-time constant anymore. We expect almost no users to notice this.
But if used for stack allocations it now must be replaced with a custom
constant using NPY_MAXARGS as an additional runtime check.

The sizeof(PyArrayMultiIterObject) no longer includes the full size of
the object. We expect nobody to notice this change. It was necessary to
avoid issues with Cython.

(gh-25271)

Required changes for custom legacy user dtypes

In order to improve our DTypes it is unfortunately necessary to break
the ABI, which requires some changes for dtypes registered with
PyArray_RegisterDataType. Please see the documentation of
PyArray_RegisterDataType for how to adapt your code and achieve
compatibility with both 1.x and 2.x.

(gh-25792)

New Public DType API

The C implementation of the NEP 42 DType API is now public. While the
DType API has shipped in NumPy for a few versions, it was only usable in
sessions with a special environment variable set. It is now possible to
write custom DTypes outside of NumPy using the new DType API and the
normal import_array() mechanism for importing the numpy C API.

See dtype-api for more details about the API. As always with a new feature,
please report any bugs you run into implementing or using a new DType. It is
likely that downstream C code that works with dtypes will need to be updated to
work correctly with new DTypes.

(gh-25754)

New C-API import functions

We have now added PyArray_ImportNumPyAPI and PyUFunc_ImportUFuncAPI
as static inline functions to import the NumPy C-API tables. The new
functions have two advantages over import_array and import_ufunc:

  • They check whether the import was already performed and are
    light-weight if not, allowing to add them judiciously (although this
    is not preferable in most cases).
  • The old mechanisms were macros rather than functions which included
    a return statement.

The PyArray_ImportNumPyAPI() function is included in npy_2_compat.h
for simpler backporting.

(gh-25866)

Structured dtype information access through functions

The dtype structures fields c_metadata, names, fields, and
subarray must now be accessed through new functions following the same
names, such as PyDataType_NAMES. Direct access of the fields is not
valid as they do not exist for all PyArray_Descr instances. The
metadata field is kept, but the macro version should also be
preferred.

(gh-25802)

Descriptor elsize and alignment access

Unless compiling only with NumPy 2 support, the elsize and aligment
fields must now be accessed via PyDataType_ELSIZE,
PyDataType_SET_ELSIZE, and PyDataType_ALIGNMENT. In cases where the
descriptor is attached to an array, we advise using PyArray_ITEMSIZE
as it exists on all NumPy versions. Please see
migration_c_descr for more information.

(gh-25943)

NumPy 2.0 C API removals

  • npy_interrupt.h and the corresponding macros like NPY_SIGINT_ON
    have been removed. We recommend querying PyErr_CheckSignals() or
    PyOS_InterruptOccurred() periodically (these do currently require
    holding the GIL though).

  • The noprefix.h header has been removed. Replace missing symbols
    with their prefixed counterparts (usually an added NPY_ or
    npy_).

    (gh-23919)

  • PyUFunc_GetPyVals, PyUFunc_handlefperr, and PyUFunc_checkfperr
    have been removed. If needed, a new backwards compatible function to
    raise floating point errors could be restored. Reason for removal:
    there are no known users and the functions would have made
    with np.errstate() fixes much more difficult).

    (gh-23922)

  • The numpy/old_defines.h which was part of the API deprecated since
    NumPy 1.7 has been removed. This removes macros of the form
    PyArray_CONSTANT. The
    replace_old_macros.sed
    script may be useful to convert them to the NPY_CONSTANT version.

    (gh-24011)

  • The legacy_inner_loop_selector member of the ufunc struct is
    removed to simplify improvements to the dispatching system. There
    are no known users overriding or directly accessing this member.

    (gh-24271)

  • NPY_INTPLTR has been removed to avoid confusion (see intp
    redefinition).

    (gh-24888)

  • The advanced indexing MapIter and related API has been removed.
    The (truly) public part of it was not well tested and had only one
    known user (Theano). Making it private will simplify improvements to
    speed up ufunc.at, make advanced indexing more maintainable, and
    was important for increasing the maximum number of dimensions of
    arrays to 64. Please let us know if this API is important to you so
    we can find a solution together.

    (gh-25138)

  • The NPY_MAX_ELSIZE macro has been removed, as it only ever
    reflected builtin numeric types and served no internal purpose.

    (gh-25149)

  • PyArray_REFCNT and NPY_REFCOUNT are removed. Use Py_REFCNT
    instead.

    (gh-25156)

  • PyArrayFlags_Type and PyArray_NewFlagsObject as well as
    PyArrayFlagsObject are private now. There is no known use-case;
    use the Python API if needed.

  • PyArray_MoveInto, PyArray_CastTo, PyArray_CastAnyTo are
    removed use PyArray_CopyInto and if absolutely needed
    PyArray_CopyAnyInto (the latter does a flat copy).

  • PyArray_FillObjectArray is removed, its only true use was for
    implementing np.empty. Create a new empty array or use
    PyArray_FillWithScalar() (decrefs existing objects).

  • PyArray_CompareUCS4 and PyArray_CompareString are removed. Use
    the standard C string comparison functions.

  • PyArray_ISPYTHON is removed as it is misleading, has no known
    use-cases, and is easy to replace.

  • PyArray_FieldNames is removed, as it is unclear what it would be
    useful for. It also has incorrect semantics in some possible
    use-cases.

  • PyArray_TypestrConvert is removed, since it seems a misnomer and
    unlikely to be used by anyone. If you know the size or are limited
    to few types, just use it explicitly, otherwise go via Python
    strings.

    (gh-25292)

  • PyDataType_GetDatetimeMetaData is removed, it did not actually do
    anything since at least NumPy 1.7.

    (gh-25802)

  • PyArray_GetCastFunc is removed. Note that custom legacy user
    dtypes can still provide a castfunc as their implementation, but any
    access to them is now removed. The reason for this is that NumPy
    never used these internally for many years. If you use simple
    numeric types, please just use C casts directly. In case you require
    an alternative, please let us know so we can create new API such as
    PyArray_CastBuffer() which could use old or new cast functions
    depending on the NumPy version.

    (gh-25161)

New Features

np.add was extended to work with unicode and bytes dtypes.

(gh-24858)

A new bitwise_count function

This new function counts the number of 1-bits in a number.
numpy.bitwise_count works on all the numpy integer types
and integer-like objects.

>>> a = np.array([2**i - 1 for i in range(16)])
>>> np.bitwise_count(a)
array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15],
      dtype=uint8)

(gh-19355)

macOS Accelerate support, including the ILP64

Support for the updated Accelerate BLAS/LAPACK library, including ILP64
(64-bit integer) support, in macOS 13.3 has been added. This brings
arm64 support, and significant performance improvements of up to 10x for
commonly used linear algebra operations. When Accelerate is selected at
build time, or if no explicit BLAS library selection is done, the 13.3+
version will automatically be used if available.

(gh-24053)

Binary wheels are also available. On macOS >=14.0, users who install
NumPy from PyPI will get wheels built against Accelerate rather than
OpenBLAS.

(gh-25255)

Option to use weights for quantile and percentile functions

A weights keyword is now available for numpy.quantile, numpy.percentile,
numpy.nanquantile and numpy.nanpercentile. Only method="inverted_cdf"
supports weights.

(gh-24254)

Improved CPU optimization tracking

A new tracer mechanism is available which enables tracking of the
enabled targets for each optimized function (i.e., that uses
hardware-specific SIMD instructions) in the NumPy library. With this
enhancement, it becomes possible to precisely monitor the enabled CPU
dispatch targets for the dispatched functions.

A new function named opt_func_info has been added to the new namespace
numpy.lib.introspect, offering this tracing capability. This function allows
you to retrieve information about the enabled targets based on function names
and data type signatures.

(gh-24420)

A new Meson backend for f2py

f2py in compile mode (i.e. f2py -c) now accepts the
--backend meson option. This is the default option for Python >=3.12.
For older Python versions, f2py will still default to
--backend distutils.

To support this in realistic use-cases, in compile mode f2py takes a
--dep flag one or many times which maps to dependency() calls in the
meson backend, and does nothing in the distutils backend.

There are no changes for users of f2py only as a code generator, i.e.
without -c.

(gh-24532)

bind(c) support for f2py

Both functions and subroutines can be annotated with bind(c). f2py
will handle both the correct type mapping, and preserve the unique label
for other C interfaces.

Note: bind(c, name = 'routine_name_other_than_fortran_routine') is
not honored by the f2py bindings by design, since bind(c) with the
name is meant to guarantee only the same name in C and Fortran, not in
Python and Fortran.

(gh-24555)

A new strict option for several testing functions

The strict keyword is now available for numpy.testing.assert_allclose,
numpy.testing.assert_equal, and numpy.testing.assert_array_less. Setting
strict=True will disable the broadcasting behaviour for scalars and ensure
that input arrays have the same data type.

(gh-24680,
gh-24770,
gh-24775)

Add np.core.umath.find and np.core.umath.rfind UFuncs

Add two find and rfind UFuncs that operate on unicode or byte
strings and are used in np.char. They operate similar to str.find
and str.rfind.

(gh-24868)

diagonal and trace for numpy.linalg

numpy.linalg.diagonal and numpy.linalg.trace have been added, which are
array API standard-compatible variants of numpy.diagonal and numpy.trace.
They differ in the default axis selection which define 2-D sub-arrays.

(gh-24887)

New long and ulong dtypes

numpy.long and numpy.ulong have been added as NumPy integers mapping to
C's long and unsigned long. Prior to NumPy 1.24, numpy.long was an alias
to Python's int.

(gh-24922)

svdvals for numpy.linalg

numpy.linalg.svdvals has been added. It computes singular values for (a stack
of) matrices. Executing np.svdvals(x) is the same as calling np.svd(x, compute_uv=False, hermitian=False). This function is compatible with the array
API standard.

(gh-24940)

A new isdtype function

numpy.isdtype was added to provide a canonical way to classify NumPy's
dtypes in compliance with the array API standard.

(gh-25054)

A new astype function

numpy.astype was added to provide an array API standard-compatible
alternative to the numpy.ndarray.astype method.

(gh-25079)

Array API compatible functions' aliases

13 aliases for existing functions were added to improve compatibility
with the array API standard:

  • Trigonometry: acos, acosh, asin, asinh, atan, atanh,
    atan2.
  • Bitwise: bitwise_left_shift, bitwise_invert,
    bitwise_right_shift.
  • Misc: concat, permute_dims, pow.
  • In numpy.linalg: tensordot, matmul.

(gh-25086)

New unique_* functions

The numpy.unique_all, numpy.unique_counts, numpy.unique_inverse, and
numpy.unique_values functions have been added. They provide functionality of
numpy.unique with different sets of flags. They are array API
standard-compatible, and because the number of arrays they return does not
depend on the values of input arguments, they are easier to target for JIT
compilation.

(gh-25088)

Matrix transpose support for ndarrays

NumPy now offers support for calculating the matrix transpose of an
array (or stack of arrays). The matrix transpose is equivalent to
swapping the last two axes of an array. Both np.ndarray and
np.ma.MaskedArray now expose a .mT attribute, and there is a
matching new numpy.matrix_transpose function.

(gh-23762)

Array API compatible functions for numpy.linalg

Six new functions and two aliases were added to improve compatibility
with the Array API standard for `numpy.linalg`:

  • numpy.linalg.matrix_norm - Computes the matrix norm of
    a matrix (or a stack of matrices).

  • numpy.linalg.vector_norm - Computes the vector norm of
    a vector (or batch of vectors).

  • numpy.vecdot - Computes the (vector) dot product of
    two arrays.

  • numpy.linalg.vecdot - An alias for
    numpy.vecdot.

  • numpy.linalg.matrix_transpose - An alias for
    numpy.matrix_transpose.

    (gh-25155)

  • numpy.linalg.outer has been added. It computes the
    outer product of two vectors. It differs from
    numpy.outer by accepting one-dimensional arrays only.
    This function is compatible with the array API standard.

    (gh-25101)

  • numpy.linalg.cross has been added. It computes the
    cross product of two (arrays of) 3-dimensional vectors. It differs
    from numpy.cross by accepting three-dimensional
    vectors only. This function is compatible with the array API
    standard.

    (gh-25145)

A correction argument for var and std

A correction argument was added to numpy.var and numpy.std, which is an
array API standard compatible alternative to ddof. As both arguments serve a
similar purpose, only one of them can be provided at the same time.

(gh-25169)

ndarray.device and ndarray.to_device

An ndarray.device attribute and ndarray.to_device method were added
to numpy.ndarray for array API standard compatibility.

Additionally, device keyword-only arguments were added to:
numpy.asarray, numpy.arange, numpy.empty, numpy.empty_like,
numpy.eye, numpy.full, numpy.full_like, numpy.linspace, numpy.ones,
numpy.ones_like, numpy.zeros, and numpy.zeros_like.

For all these new arguments, only device="cpu" is supported.

(gh-25233)

StringDType has been added to NumPy

We have added a new variable-width UTF-8 encoded string data type, implementing
a "NumPy array of Python strings", including support for a user-provided
missing data sentinel. It is intended as a drop-in replacement for arrays of
Python strings and missing data sentinels using the object dtype. See
NEP 55 and the documentation
of stringdtype for more details.

(gh-25347)

New keywords for cholesky and pinv

The upper and rtol keywords were added to
numpy.linalg.cholesky and numpy.linalg.pinv,
respectively, to improve array API standard compatibility.

For numpy.linalg.pinv, if neither rcond nor rtol is
specified, the rcond's default is used. We plan to deprecate and
remove rcond in the future.

(gh-25388)

New keywords for sort, argsort and linalg.matrix_rank

New keyword parameters were added to improve array API standard
compatibility:

  • rtol was added to numpy.linalg.matrix_rank.
  • stable was added to numpy.sort and
    numpy.argsort.

(gh-25437)

New numpy.strings namespace for string ufuncs

NumPy now implements some string operations as ufuncs. The old np.char
namespace is still available, and where possible the string manipulation
functions in that namespace have been updated to use the new ufuncs,
substantially improving their performance.

Where possible, we suggest updating code to use functions in
np.strings instead of np.char. In the future we may deprecate
np.char in favor of np.strings.

(gh-25463)

numpy.fft support for different precisions and in-place calculations

The various FFT routines in numpy.fft now do their
calculations natively in float, double, or long double precision,
depending on the input precision, instead of always calculating in
double precision. Hence, the calculation will now be less precise for
single and more precise for long double precision. The data type of the
output array will now be adjusted accordingly.

Furthermore, all FFT routines have gained an out argument that can be
used for in-place calculations.

(gh-25536)

configtool and pkg-config support

A new numpy-config CLI script is available that can be queried for the
NumPy version and for compile flags needed to use the NumPy C API. This
will allow build systems to better support the use of NumPy as a
dependency. Also, a numpy.pc pkg-config file is now included with
Numpy. In order to find its location for use with PKG_CONFIG_PATH, use
numpy-config --pkgconfigdir.

(gh-25730)

Array API standard support in the main namespace

The main numpy namespace now supports the array API standard. See
array-api-standard-compatibility for
details.

(gh-25911)

Improvements

Strings are now supported by any, all, and the logical ufuncs.

(gh-25651)

Integer sequences as the shape argument for memmap

numpy.memmap can now be created with any integer sequence
as the shape argument, such as a list or numpy array of integers.
Previously, only the types of tuple and int could be used without
raising an error.

(gh-23729)

errstate is now faster and context safe

The numpy.errstate context manager/decorator is now faster
and safer. Previously, it was not context safe and had (rare) issues
with thread-safety.

(gh-23936)

AArch64 quicksort speed improved by using Highway's VQSort

The first introduction of the Google Highway library, using VQSort on
AArch64. Execution time is improved by up to 16x in some cases, see the
PR for benchmark results. Extensions to other platforms will be done in
the future.

(gh-24018)

Complex types - underlying C type changes

  • The underlying C types for all of NumPy's complex types have been
    changed to use C99 complex types.

  • While this change does not affect the memory layout of complex
    types, it changes the API to be used to directly retrieve or write
    the real or complex part of the complex number, since direct field
    access (as in c.real or c.imag) is no longer an option. You can
    now use utilities provided in numpy/npy_math.h to do these
    operations, like this:

    npy_cdouble c;
    npy_csetreal(&c, 1.0);
    npy_csetimag(&c, 0.0);
    printf("%d + %di\n", npy_creal(c), npy_cimag(c));
    
  • To ease cross-version compatibility, equivalent macros and a
    compatibility layer have been added which can be used by downstream
    packages to continue to support both NumPy 1.x and 2.x. See
    complex-numbers for more info.

  • numpy/npy_common.h now includes complex.h, which means that
    complex is now a reserved keyword.

(gh-24085)

iso_c_binding support and improved common blocks for f2py

Previously, users would have to define their own custom f2cmap file to
use type mappings defined by the Fortran2003 iso_c_binding intrinsic
module. These type maps are now natively supported by f2py

(gh-24555)

f2py now handles common blocks which have kind specifications from
modules. This further expands the usability of intrinsics like
iso_fortran_env and iso_c_binding.

(gh-25186)

Call str automatically on third argument to functions like assert_equal

The third argument to functions like
numpy.testing.assert_equal now has str called on it
automatically. This way it mimics the built-in assert statement, where
assert_equal(a, b, obj) works like assert a == b, obj.

(gh-24877)

Support for array-like atol/rtol in isclose, allclose

The keywords atol and rtol in numpy.isclose and
numpy.allclose now accept both scalars and arrays. An
array, if given, must broadcast to the shapes of the first two array
arguments.

(gh-24878)

Consistent failure messages in test functions

Previously, some numpy.testing assertions printed messages
that referred to the actual and desired results as x and y. Now,
these values are consistently referred to as ACTUAL and DESIRED.

(gh-24931)

n-D FFT transforms allow s[i] == -1

The numpy.fft.fftn, numpy.fft.ifftn,
numpy.fft.rfftn, numpy.fft.irfftn,
numpy.fft.fft2, numpy.fft.ifft2,
numpy.fft.rfft2 and numpy.fft.irfft2
functions now use the whole input array along the axis i if
s[i] == -1, in line with the array API standard.

(gh-25495)

Guard PyArrayScalar_VAL and PyUnicodeScalarObject for the limited API

PyUnicodeScalarObject holds a PyUnicodeObject, which is not
available when using Py_LIMITED_API. Add guards to hide it and
consequently also make the PyArrayScalar_VAL macro hidden.

(gh-25531)

Changes

  • np.gradient() now returns a tuple rather than a list making the
    return value immutable.

    (gh-23861)

  • Being fully context and thread-safe, np.errstate can only be
    entered once now.

  • np.setbufsize is now tied to np.errstate(): leaving an
    np.errstate context will also reset the bufsize.

    (gh-23936)

  • A new public np.lib.array_utils submodule has been introduced and
    it currently contains three functions: byte_bounds (moved from
    np.lib.utils), normalize_axis_tuple and normalize_axis_index.

    (gh-24540)

  • Introduce numpy.bool as the new canonical name for
    NumPy's boolean dtype, and make numpy.bool\_ an alias
    to it. Note that until NumPy 1.24, np.bool was an alias to
    Python's builtin bool. The new name helps with array API standard
    compatibility and is a more intuitive name.

    (gh-25080)

  • The dtype.flags value was previously stored as a signed integer.
    This means that the aligned dtype struct flag lead to negative flags
    being set (-128 rather than 128). This flag is now stored unsigned
    (positive). Code which checks flags manually may need to adapt. This
    may include code compiled with Cython 0.29.x.

    (gh-25816)

Representation of NumPy scalars changed

As per NEP 51, the scalar representation has been updated to include the type
information to avoid confusion with Python scalars.

Scalars are now printed as np.float64(3.0) rather than just 3.0.
This may disrupt workflows that store representations of numbers (e.g.,
to files) making it harder to read them. They should be stored as
explicit strings, for example by using str() or f"{scalar!s}". For
the time being, affected users can use
np.set_printoptions(legacy="1.25") to get the old behavior (with
possibly a few exceptions). Documentation of downstream projects may
require larger updates, if code snippets are tested. We are working on
tooling for
doctest-plus
to facilitate updates.

(gh-22449)

Truthiness of NumPy strings changed

NumPy strings previously were inconsistent about how they defined if the
string is True or False and the definition did not match the one
used by Python. Strings are now considered True when they are
non-empty and False when they are empty. This changes the following
distinct cases:

  • Casts from string to boolean were previously roughly equivalent to
    string_array.astype(np.int64).astype(bool), meaning that only
    valid integers could be cast. Now a string of "0" will be
    considered True since it is not empty. If you need the old
    behavior, you may use the above step (casting to integer first) or
    string_array == "0" (if the input is only ever 0 or 1). To get
    the new result on old NumPy versions use string_array != "".
  • np.nonzero(string_array) previously ignored whitespace so that a
    string only containing whitespace was considered False. Whitespace
    is now considered True.

This change does not affect np.loadtxt, np.fromstring, or
np.genfromtxt. The first two still use the integer definition, while
genfromtxt continues to match for "true" (ignoring case). However,
if np.bool_ is used as a converter the result will change.

The change does affect np.fromregex as it uses direct assignments.

(gh-23871)

A mean keyword was added to var and std function

Often when the standard deviation is needed the mean is also needed. The
same holds for the variance and the mean. Until now the mean is then
calculated twice, the change introduced here for the numpy.var and
numpy.std functions allows for passing in a precalculated mean as an keyword
argument. See the docstrings for details and an example illustrating the
speed-up.

(gh-24126)

Remove datetime64 deprecation warning when constructing with timezone

The numpy.datetime64 method now issues a UserWarning rather than a
DeprecationWarning whenever a timezone is included in the datetime string that
is provided.

(gh-24193)

Default integer dtype is now 64-bit on 64-bit Windows

The default NumPy integer is now 64-bit on all 64-bit systems as the
historic 32-bit default on Windows was a common source of issues. Most
users should not notice this. The main issues may occur with code
interfacing with libraries written in a compiled language like C. For
more information see migration_windows_int64.

(gh-24224)

Renamed numpy.core to numpy._core

Accessing numpy.core now emits a DeprecationWarning. In practice we
have found that most downstream usage of numpy.core was to access
functionality that is available in the main numpy namespace. If for
some reason you are using functionality in numpy.core that is not
available in the main numpy namespace, this means you are likely using
private NumPy internals. You can still access these internals via
numpy._core without a deprecation warning but we do not provide any
backward compatibility guarantees for NumPy internals. Please open an
issue if you think a mistake was made and something needs to be made
public.

(gh-24634)

The "relaxed strides" debug build option, which was previously enabled
through the NPY_RELAXED_STRIDES_DEBUG environment variable or the
-Drelaxed-strides-debug config-settings flag has been removed.

(gh-24717)

Redefinition of np.intp/np.uintp (almost never a change)

Due to the actual use of these types almost always matching the use of
size_t/Py_ssize_t this is now the definition in C. Previously, it
matched intptr_t and uintptr_t which would often have been subtly
incorrect. This has no effect on the vast majority of machines since the
size of these types only differ on extremely niche platforms.

However, it means that:

  • Pointers may not necessarily fit into an intp typed array anymore.
    The p and P character codes can still be used, however.
  • Creating intptr_t or uintptr_t typed arrays in C remains
    possible in a cross-platform way via PyArray_DescrFromType('p').
  • The new character codes nN were introduced.
  • It is now correct to use the Python C-API functions when parsing to
    npy_intp typed arguments.

(gh-24888)

numpy.fft.helper made private

numpy.fft.helper was renamed to numpy.fft._helper to indicate that
it is a private submodule. All public functions exported by it should be
accessed from numpy.fft.

(gh-24945)

numpy.linalg.linalg made private

numpy.linalg.linalg was renamed to numpy.linalg._linalg to indicate
that it is a private submodule. All public functions exported by it
should be accessed from numpy.linalg.

(gh-24946)

Out-of-bound axis not the same as axis=None

In some cases axis=32 or for concatenate any large value was the same
as axis=None. Except for concatenate this was deprecate. Any out of
bound axis value will now error, make sure to use axis=None.

(gh-25149)

New copy keyword meaning for array and asarray constructors

Now numpy.array and numpy.asarray support
three values for copy parameter:

  • None - A copy will only be made if it is necessary.
  • True - Always make a copy.
  • False - Never make a copy. If a copy is required a ValueError is
    raised.

The meaning of False changed as it now raises an exception if a copy
is needed.

(gh-25168)

The __array__ special method now takes a copy keyword argument.

NumPy will pass copy to the __array__ special method in situations
where it would be set to a non-default value (e.g. in a call to
np.asarray(some_object, copy=False)). Currently, if an unexpected
keyword argument error is raised after this, NumPy will print a warning
and re-try without the copy keyword argument. Implementations of
objects implementing the __array__ protocol should accept a copy
keyword argument with the same meaning as when passed to
numpy.array or numpy.asarray.

(gh-25168)

Cleanup of initialization of numpy.dtype with strings with commas

The interpretation of strings with commas is changed slightly, in that a
trailing comma will now always create a structured dtype. E.g., where
previously np.dtype("i") and np.dtype("i,") were treated as
identical, now np.dtype("i,") will create a structured dtype, with a
single field. This is analogous to np.dtype("i,i") creating a
structured dtype with two fields, and makes the behaviour consistent
with that expected of tuples.

At the same time, the use of single number surrounded by parenthesis to
indicate a sub-array shape, like in np.dtype("(2)i,"), is deprecated.
Instead; one should use np.dtype("(2,)i") or np.dtype("2i").
Eventually, using a number in parentheses will raise an exception, like
is the case for initializations without a comma, like
np.dtype("(2)i").

(gh-25434)

Change in how complex sign is calculated

Following the array API standard, the complex sign is now calculated as
z / |z| (instead of the rather less logical case where the sign of the
real part was taken, unless the real part was zero, in which case the
sign of the imaginary part was returned). Like for real numbers, zero is
returned if z==0.

(gh-25441)

Return types of functions that returned a list of arrays

Functions that returned a list of ndarrays have been changed to return a
tuple of ndarrays instead. Returning tuples consistently whenever a
sequence of arrays is returned makes it easier for JIT compilers like
Numba, as well as for static type checkers in some cases, to support
these functions. Changed functions are: numpy.atleast_1d, numpy.atleast_2d,
numpy.atleast_3d, numpy.broadcast_arrays, numpy.meshgrid,
numpy.ogrid, numpy.histogramdd.

np.unique return_inverse shape for multi-dimensional inputs

When multi-dimensional inputs are passed to np.unique with
return_inverse=True, the unique_inverse output is now shaped such
that the input can be reconstructed directly using
np.take(unique, unique_inverse) when axis=None, and
np.take_along_axis(unique, unique_inverse, axis=axis) otherwise.

(gh-25553,
gh-25570)

any and all return booleans for object arrays

The any and all functions and methods now return booleans also for
object arrays. Previously, they did a reduction which behaved like the
Python or and and operators which evaluates to one of the arguments.
You can use np.logical_or.reduce and np.logical_and.reduce to
achieve the previous behavior.

(gh-25712)

Checksums

MD5

097c3c7e3d5159bee4fd60fabb6f7c15  numpy-2.0.0rc1-cp310-cp310-macosx_10_9_x86_64.whl
dcf4a04f08be737a3224a3fe0f408857  numpy-2.0.0rc1-cp310-cp310-macosx_11_0_arm64.whl
ceee44fdc825abe8945030cc74d78340  numpy-2.0.0rc1-cp310-cp310-macosx_14_0_arm64.whl
0d77ca403f1c03ea0cf3005136d0adbe  numpy-2.0.0rc1-cp310-cp310-macosx_14_0_x86_64.whl
e1a620f15fd797e0e6fe0d3af7dfac6f  numpy-2.0.0rc1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
c356e0c2c7afde1c1e208bab64541e78  numpy-2.0.0rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
106c02ca9f2dd023d3d1fa67c00de71f  numpy-2.0.0rc1-cp310-cp310-musllinux_1_1_aarch64.whl
ebbb64f3bf69a58cc2a410d4e9265e7f  numpy-2.0.0rc1-cp310-cp310-musllinux_1_1_x86_64.whl
a9cbb955a541f4e9fd55a779b35e986e  numpy-2.0.0rc1-cp310-cp310-win32.whl
e54e931ca6b7d51919952f8bb5dc46ee  numpy-2.0.0rc1-cp310-cp310-win_amd64.whl
dafd6406b44c5675b002456a4ceb6a26  numpy-2.0.0rc1-cp311-cp311-macosx_10_9_x86_64.whl
4f8b3c8f5cfcb69c78ce41e41cc33085  numpy-2.0.0rc1-cp311-cp311-macosx_11_0_arm64.whl
921260667355fc407dbcf1ec11b75bd2  numpy-2.0.0rc1-cp311-cp311-macosx_14_0_arm64.whl
9554e7e501b7751d144aacc8658e9a45  numpy-2.0.0rc1-cp311-cp311-macosx_14_0_x86_64.whl
683df12eba035788df3092869f6003f0  numpy-2.0.0rc1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
3df4b3fb1e4d865c393e2938991481d2  numpy-2.0.0rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
f1a8fdcb957b9f04aa2d621c3f8c3ece  numpy-2.0.0rc1-cp311-cp311-musllinux_1_1_aarch64.whl
0a12d7d664d450efb24c801df03d58ac  numpy-2.0.0rc1-cp311-cp311-musllinux_1_1_x86_64.whl
272659018425cca4123bb46985b48fbd  numpy-2.0.0rc1-cp311-cp311-win32.whl
fc6707777a4d21c554cbd1ee40d02efa  numpy-2.0.0rc1-cp311-cp311-win_amd64.whl
1ab256609e0eb2b86f72e238becd9b49  numpy-2.0.0rc1-cp312-cp312-macosx_10_9_x86_64.whl
71e858d89823dfc3a005218092af49a6  numpy-2.0.0rc1-cp312-cp312-macosx_11_0_arm64.whl
77bd5f87b628b0e6f39e0df7166f3ae1  numpy-2.0.0rc1-cp312-cp312-macosx_14_0_arm64.whl
efda4b10dc0fe086e1d33747d9102cd7  numpy-2.0.0rc1-cp312-cp312-macosx_14_0_x86_64.whl
d2e813366f0ab4fd6ec6077390fc9de2  numpy-2.0.0rc1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
616efe037e2538681f5ab223b6428e69  numpy-2.0.0rc1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
46da92334bd791c759bf414ed61e4a7a  numpy-2.0.0rc1-cp312-cp312-musllinux_1_1_aarch64.whl
2f45fe8fa2648093ba0578416fc3f7a9  numpy-2.0.0rc1-cp312-cp312-musllinux_1_1_x86_64.whl
edc8cf6127019ed7773ed8e5b27a52e8  numpy-2.0.0rc1-cp312-cp312-win32.whl
47b8fcfe22189f9bbc97d30be3f6ba29  numpy-2.0.0rc1-cp312-cp312-win_amd64.whl
3578edf376be61c3173f9eecf4bdeb08  numpy-2.0.0rc1-cp39-cp39-macosx_10_9_x86_64.whl
1571b789456e859b9fa1550e9fcca88a  numpy-2.0.0rc1-cp39-cp39-macosx_11_0_arm64.whl
d09858e54060d0bd38b30f59488b6e9f  numpy-2.0.0rc1-cp39-cp39-macosx_14_0_arm64.whl
2cb1770fb5f426b9c542672d6a39253c  numpy-2.0.0rc1-cp39-cp39-macosx_14_0_x86_64.whl
21f7304c982fb92c4d6c165fc6e9c672  numpy-2.0.0rc1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
96101f85cc666c5666fcb9b8eebd7cbc  numpy-2.0.0rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
1469682f758821e6657cbb7469bad713  numpy-2.0.0rc1-cp39-cp39-musllinux_1_1_aarch64.whl
8664fc00fed8e741265dce45b9b13054  numpy-2.0.0rc1-cp39-cp39-musllinux_1_1_x86_64.whl
2098687405b0e05a952ad72121d26365  numpy-2.0.0rc1-cp39-cp39-win32.whl
b54376b8422df10f4bbed2fa7070395f  numpy-2.0.0rc1-cp39-cp39-win_amd64.whl
fef9749bcacad7b4fdece4d0b5b8bb47  numpy-2.0.0rc1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
3f8303f1768278acb0fcc8ed8fb919f2  numpy-2.0.0rc1-pp39-pypy39_pp73-macosx_14_0_x86_64.whl
227fc258d8b40361ddc1ecbd8b95b6bc  numpy-2.0.0rc1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
466e180fd734cccf2ea3170cc3a97d53  numpy-2.0.0rc1-pp39-pypy39_pp73-win_amd64.whl
04b5c7de86e2883a5aed5a9f1a7f414c  numpy-2.0.0rc1.tar.gz

SHA256

9d96878db0d4f267e62e21f6feb7d0e7f07ec02784e705f37b7f6493a935c7fd  numpy-2.0.0rc1-cp310-cp310-macosx_10_9_x86_64.whl
f9e566457284cb55447eab7566fad2b59e17f01776bb1b76828a6a931d111c72  numpy-2.0.0rc1-cp310-cp310-macosx_11_0_arm64.whl
6e0438e248b5e7e46e80a686868d36d6a4ce875cedce87122d1616ffd8e2a669  numpy-2.0.0rc1-cp310-cp310-macosx_14_0_arm64.whl
015df68fd97bc00e1b7719e80cea401b23a601b639c6d6545922f7a21876b771  numpy-2.0.0rc1-cp310-cp310-macosx_14_0_x86_64.whl
cdea89bba67157bd8ec2ba9613d9f5ba2d18deab113171ca106953fdf8f7f314  numpy-2.0.0rc1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
cfd4e2f1605e3a607674dd3173c03b2e2f8520fa3ec2db04f2da2a3d5339df1b  numpy-2.0.0rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
25d43c681fefb4d7e0ffa949097b20eacbad4be9af7c136b1f69dc4c34c1f6d4  numpy-2.0.0rc1-cp310-cp310-musllinux_1_1_aarch64.whl
9da7cddeaf312a3645325a7da3b18bfad345cae5005cb4d6fcf24796bedaf239  numpy-2.0.0rc1-cp310-cp310-musllinux_1_1_x86_64.whl
d4b56e9abe2c3cec5615725320e002396c1e4b78011831a78427c7ff7b185816  numpy-2.0.0rc1-cp310-cp310-win32.whl
5c62c0d071681391b9c73ba09b35cb46477659012fd88af2c877a2a9da84aa2f  numpy-2.0.0rc1-cp310-cp310-win_amd64.whl
060635ab843ea0e2aa6ad153d5656193014eedd90ec4ef6e2b738d81bfe28170  numpy-2.0.0rc1-cp311-cp311-macosx_10_9_x86_64.whl
91103edc14b5b70bc25af26ea5d75a45b6490bed5f1da9478f5bbe82542ba1b5  numpy-2.0.0rc1-cp311-cp311-macosx_11_0_arm64.whl
7d990411f2821bf2812ec66ae85e8f351103fe7c3a229152ab6f8c9a620e82eb  numpy-2.0.0rc1-cp311-cp311-macosx_14_0_arm64.whl
5e289dafe89a0dd756430fa03332c428c897c41cc3143230c38d7d2bb9ad475e  numpy-2.0.0rc1-cp311-cp311-macosx_14_0_x86_64.whl
2b5f87d88212e54263f64257b28daa04f3fde627c204abd7557a80b582de4a63  numpy-2.0.0rc1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
67f9707c3df26ca5bce34162fe0721646504c5961ccfca94c294fbeaf42cfa5b  numpy-2.0.0rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
7511694264a1219458a4e77d185a7ee350506b4e1e3b2b82845a5e9db044b6f5  numpy-2.0.0rc1-cp311-cp311-musllinux_1_1_aarch64.whl
09e7a6cab5eac8aca0f17ad29b42ee1cd357e09a76076d5f4cb90ca62a0229b8  numpy-2.0.0rc1-cp311-cp311-musllinux_1_1_x86_64.whl
dfcd76a018c728ce7a3e6e09717e7a3dfbffdf87a57118dbc5ddc2167a678258  numpy-2.0.0rc1-cp311-cp311-win32.whl
afa4679bcbade6a4197c27874c0dacf5d45470d56cee8b1e2398e80859ab797c  numpy-2.0.0rc1-cp311-cp311-win_amd64.whl
1e2478ca8b4b0c5a7146fc316c83843bc47b2d73cf6c02000561794ae5dba537  numpy-2.0.0rc1-cp312-cp312-macosx_10_9_x86_64.whl
09bedcb99b9ac5472d2e63cd18be861750acc7570ae3661be7cb6018ce376694  numpy-2.0.0rc1-cp312-cp312-macosx_11_0_arm64.whl
8a7c01e9c14216e386e42a0c75c76a015a002dd5ed833ffbdaa6a7f2aeed9258  numpy-2.0.0rc1-cp312-cp312-macosx_14_0_arm64.whl
00236e0e8a588fef8f70e0535b898bcebd97becc0b27686d2fc7cb35b5d1ab91  numpy-2.0.0rc1-cp312-cp312-macosx_14_0_x86_64.whl
f36b7ccac6a3bfb342a61dd08be73fbe0286d2cb64c976bb1ed22feda0deb16f  numpy-2.0.0rc1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
fb009d69b3a362240acc5155e3de8f90311eb7f9f3958803af866945b8c9ee43  numpy-2.0.0rc1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
684eef178a2039cba72bce740cdf2f592e67a41885a0f09d5622380fc59af0f8  numpy-2.0.0rc1-cp312-cp312-musllinux_1_1_aarch64.whl
8b510bab996ad7b7fa59ca14fdaae4c68a36ff0f71ccd9ddec769b58f9d19258  numpy-2.0.0rc1-cp312-cp312-musllinux_1_1_x86_64.whl
08d7d73d5b7d97decfb6584f41492f5584f81a3147514b67ac21ccccb3418b35  numpy-2.0.0rc1-cp312-cp312-win32.whl
39a65e8c127d51419942a9e0ec467273536acd373507ce64e63451690ed47bfc  numpy-2.0.0rc1-cp312-cp312-win_amd64.whl
5be315e916e7d4d372acf62dcc86900eb47b2f76c185d835634dd0503f441e35  numpy-2.0.0rc1-cp39-cp39-macosx_10_9_x86_64.whl
b1bfbde0e9221920d02735ced823e53be46786589a5e8db91824bccd5115e5c8  numpy-2.0.0rc1-cp39-cp39-macosx_11_0_arm64.whl
f6539759d26e9b60dd9691732528dda7fe46a8c82be6294d109203dce4a8b89c  numpy-2.0.0rc1-cp39-cp39-macosx_14_0_arm64.whl
7517f752cad3d8bf297ed6421c63be769a03b8e3c34282eec803bae693dae67a  numpy-2.0.0rc1-cp39-cp39-macosx_14_0_x86_64.whl
8798ee3db69d2f531b12897929583021206feb4d45234d035e5511a5bd0cee38  numpy-2.0.0rc1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
070a8b1c93b0bf21c1a3c51514145acbba612e9f3fd86870c1ca37a36cebbfce  numpy-2.0.0rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
706f66648712385f5ca5e22ad4f32d1a1a93c143882969d951122b5cf9e40a24  numpy-2.0.0rc1-cp39-cp39-musllinux_1_1_aarch64.whl
cf1b08d8ee6d24576c0552dee71f36859de157481ed283e839d630b50242bbe1  numpy-2.0.0rc1-cp39-cp39-musllinux_1_1_x86_64.whl
c0af260d6818eab709b65953e1e5ce31a34d68230f488589b4bb96b13a28d18f  numpy-2.0.0rc1-cp39-cp39-win32.whl
1860507cb082ee8d9920db806d74d8a3936081b9ecf274b0fdb6d99b664680a1  numpy-2.0.0rc1-cp39-cp39-win_amd64.whl
9085f9a3e4f994ee8027db503627ae34aa867dc5f00ee7fe2b930608534a9293  numpy-2.0.0rc1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
fbee730ae5265735e2c9b006a0d3fe1443d08d9399d0103245b99ecba10ddff0  numpy-2.0.0rc1-pp39-pypy39_pp73-macosx_14_0_x86_64.whl
d93d29d07b2da78869793ec30321adda61a5a48b9e00d12160d0cd658f5f2e0b  numpy-2.0.0rc1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
fe19044006aeaf783c64f22ee03330caccb4d3e54fe605b57444f448954b022d  numpy-2.0.0rc1-pp39-pypy39_pp73-win_amd64.whl
f0e169ec6cbc1b8e5f6a235845a80961f76f88352082213a1728a0967a761ad2  numpy-2.0.0rc1.tar.gz
numpy -

Published by charris 7 months ago

NumPy 2.0.0 Release Notes

Note

The release of 2.0 is in progress and the current release overview and
highlights are still in a draft state. However, the highlights should
already list the most significant changes detailed in the full notes
below, and those full notes should be complete (if not copy-edited well
enough yet).

NumPy 2.0.0 is the first major release since 2006. It is the result of
10 months of development since the last feature release and is the work
of 190 contributors spread over 968 pull requests. It contains a large
number of exciting new features as well as changes to both the Python
and C APIs.

This major release includes breaking changes that could not happen in a
regular minor (feature) release - including an ABI break, changes to
type promotion rules, and API changes which may not have been emitting
deprecation warnings in 1.26.x. Key documents related to how to adapt to
changes in NumPy 2.0, in addition to these release notes, include:

Highlights

Highlights of this release include:

  • New features:
    • A new variable-length string dtype, numpy.dtypes.StringDType and a new
      numpy.strings namespace with performant ufuncs for string operations,
    • Support for float32 and longdouble in all
      numpy.fft functions,
    • Support for the array API standard in the main numpy
      namespace.
  • Performance improvements:
    • Sorting functions sort, argsort,
      partition, argpartition have been
      accelerated through the use of the Intel x86-simd-sort and
      Google Highway libraries, and may see large (hardware-specific)
      speedups,
    • macOS Accelerate support and binary wheels for macOS >=14, with
      significant performance improvements for linear algebra
      operations on macOS, and wheels that are about 3 times smaller,
    • numpy.char fixed-length string operations have
      been accelerated by implementing ufuncs that also support
      numpy.dtypes.StringDType in addition to the
      fixed-length string dtypes,
    • A new tracing and introspection API,
      numpy.lib.introspect.opt_func_info, to determine
      which hardware-specific kernels are available and will be
      dispatched to.
  • Python API improvements:
    • A clear split between public and private API, with a new module
      structure and each public function now available in a single place.
    • Many removals of non-recommended functions and aliases. This
      should make it easier to learn and use NumPy. The number of
      objects in the main namespace decreased by ~10% and in
      numpy.lib by ~80%.
    • Canonical dtype names and a new numpy.isdtype` introspection
      function,
  • C API improvements:
    • A new public C API for creating custom dtypes,
    • Many outdated functions and macros removed, and private
      internals hidden to ease future extensibility,
    • New, easier to use, initialization functions: PyArray_ImportNumPyAPI
      and PyUFunc_ImportUFuncAPI.
  • Improved behavior:
    • Improvements to type promotion behavior was changed by adopting NEP 50.
      This fixes many user surprises about promotions which previously often
      depended on data values of input arrays rather than only their dtypes.
      Please see the NEP and the numpy-2-migration-guide for details as this
      change can lead to changes in output dtypes and lower precision results
      for mixed-dtype operations.
    • The default integer type on Windows is now int64 rather than
      int32, matching the behavior on other platforms,
    • The maximum number of array dimensions is changed from 32 to 64
  • Documentation:
    • The reference guide navigation was significantly improved, and
      there is now documentation on NumPy's
      module structure,
    • The building from source documentation was completely rewritten,

Furthermore there are many changes to NumPy internals, including
continuing to migrate code from C to C++, that will make it easier to
improve and maintain NumPy in the future.

The "no free lunch" theorem dictates that there is a price to pay for
all these API and behavior improvements and better future extensibility.
This price is:

  1. Backwards compatibility. There are a significant number of breaking
    changes to both the Python and C APIs. In the majority of cases,
    there are clear error messages that will inform the user how to
    adapt their code. However, there are also changes in behavior for
    which it was not possible to give such an error message - these
    cases are all covered in the Deprecation and Compatibility sections
    below, and in the numpy-2-migration-guide.

    Note that there is a ruff mode to auto-fix many things in Python
    code.

  2. Breaking changes to the NumPy ABI. As a result, binaries of packages
    that use the NumPy C API and were built against a NumPy 1.xx release
    will not work with NumPy 2.0. On import, such packages will see an
    ImportError with a message about binary incompatibility.

    It is possible to build binaries against NumPy 2.0 that will work at
    runtime with both NumPy 2.0 and 1.x. See numpy-2-abi-handling for more
    details.

    All downstream packages that depend on the NumPy ABI are advised
    to do a new release built against NumPy 2.0 and verify that that
    release works with both 2.0 and 1.26 - ideally in the period between
    2.0.0rc1 (which will be ABI-stable) and the final 2.0.0 release to
    avoid problems for their users.

The Python versions supported by this release are 3.9-3.12.

NumPy 2.0 Python API removals

  • np.geterrobj, np.seterrobj and the related ufunc keyword
    argument extobj= have been removed. The preferred replacement for
    all of these is using the context manager with np.errstate():.

    (gh-23922)

  • np.cast has been removed. The literal replacement for
    np.cast[dtype](arg) is np.asarray(arg, dtype=dtype).

  • np.source has been removed. The preferred replacement is
    inspect.getsource.

  • np.lookfor has been removed.

    (gh-24144)

  • numpy.who has been removed. As an alternative for the removed
    functionality, one can use a variable explorer that is available in
    IDEs such as Spyder or Jupyter Notebook.

    (gh-24321)

  • Multiple niche enums, expired members and functions have been
    removed from the main namespace, such as: ERR_*, SHIFT_*,
    np.fastCopyAndTranspose, np.kernel_version, np.numarray,
    np.oldnumeric and np.set_numeric_ops.

    (gh-24316)

  • Replaced from ... import * in the numpy/__init__.py with
    explicit imports. As a result, these main namespace members got
    removed: np.FLOATING_POINT_SUPPORT, np.FPE_*, np.NINF,
    np.PINF, np.NZERO, np.PZERO, np.CLIP, np.WRAP, np.WRAP,
    np.RAISE, np.BUFSIZE, np.UFUNC_BUFSIZE_DEFAULT,
    np.UFUNC_PYVALS_NAME, np.ALLOW_THREADS, np.MAXDIMS,
    np.MAY_SHARE_EXACT, np.MAY_SHARE_BOUNDS, add_newdoc,
    np.add_docstring and np.add_newdoc_ufunc.

    (gh-24357)

  • Alias np.float_ has been removed. Use np.float64 instead.

  • Alias np.complex_ has been removed. Use np.complex128 instead.

  • Alias np.longfloat has been removed. Use np.longdouble instead.

  • Alias np.singlecomplex has been removed. Use np.complex64
    instead.

  • Alias np.cfloat has been removed. Use np.complex128 instead.

  • Alias np.longcomplex has been removed. Use np.clongdouble
    instead.

  • Alias np.clongfloat has been removed. Use np.clongdouble
    instead.

  • Alias np.string_ has been removed. Use np.bytes_ instead.

  • Alias np.unicode_ has been removed. Use np.str_ instead.

  • Alias np.Inf has been removed. Use np.inf instead.

  • Alias np.Infinity has been removed. Use np.inf instead.

  • Alias np.NaN has been removed. Use np.nan instead.

  • Alias np.infty has been removed. Use np.inf instead.

  • Alias np.mat has been removed. Use np.asmatrix instead.

  • np.issubclass_ has been removed. Use the issubclass builtin
    instead.

  • np.asfarray has been removed. Use np.asarray with a proper dtype
    instead.

  • np.set_string_function has been removed. Use np.set_printoptions
    instead with a formatter for custom printing of NumPy objects.

  • np.tracemalloc_domain is now only available from np.lib.

  • np.recfromcsv and recfromtxt are now only available from
    np.lib.npyio.

  • np.issctype, np.maximum_sctype, np.obj2sctype,
    np.sctype2char, np.sctypes, np.issubsctype were all removed
    from the main namespace without replacement, as they where niche
    members.

  • Deprecated np.deprecate and np.deprecate_with_doc has been
    removed from the main namespace. Use DeprecationWarning instead.

  • Deprecated np.safe_eval has been removed from the main namespace.
    Use ast.literal_eval instead.

    (gh-24376)

  • np.find_common_type has been removed. Use numpy.promote_types or
    numpy.result_type instead. To achieve semantics for the
    scalar_types argument, use numpy.result_type and pass 0,
    0.0, or 0j as a Python scalar instead.

  • np.round_ has been removed. Use np.round instead.

  • np.nbytes has been removed. Use np.dtype(<dtype>).itemsize
    instead.

    (gh-24477)

  • np.compare_chararrays has been removed from the main namespace.
    Use np.char.compare_chararrays instead.

  • The charrarray in the main namespace has been deprecated. It can
    be imported without a deprecation warning from np.char.chararray
    for now, but we are planning to fully deprecate and remove
    chararray in the future.

  • np.format_parser has been removed from the main namespace. Use
    np.rec.format_parser instead.

    (gh-24587)

  • Support for seven data type string aliases has been removed from
    np.dtype: int0, uint0, void0, object0, str0, bytes0
    and bool8.

    (gh-24807)

  • The experimental numpy.array_api submodule has been removed. Use
    the main numpy namespace for regular usage instead, or the
    separate array-api-strict package for the compliance testing use
    case for which numpy.array_api was mostly used.

    (gh-25911)

__array_prepare__ is removed

UFuncs called __array_prepare__ before running computations for normal
ufunc calls (not generalized ufuncs, reductions, etc.). The function was
also called instead of __array_wrap__ on the results of some linear
algebra functions.

It is now removed. If you use it, migrate to __array_ufunc__ or rely
on __array_wrap__ which is called with a context in all cases,
although only after the result array is filled. In those code paths,
__array_wrap__ will now be passed a base class, rather than a subclass
array.

(gh-25105)

Deprecations

  • np.compat has been deprecated, as Python 2 is no longer supported.

  • np.safe_eval has been deprecated. ast.literal_eval should be
    used instead.

    (gh-23830)

  • np.recfromcsv, np.recfromtxt, np.disp, np.get_array_wrap,
    np.maximum_sctype, np.deprecate and np.deprecate_with_doc have
    been deprecated.

    (gh-24154)

  • np.trapz has been deprecated. Use np.trapezoid or a
    scipy.integrate function instead.

  • np.in1d has been deprecated. Use np.isin instead.

  • Alias np.row_stack has been deprecated. Use np.vstack directly.

    (gh-24445)

  • __array_wrap__ is now passed arr, context, return_scalar and
    support for implementations not accepting all three are deprecated.
    Its signature should be
    __array_wrap__(self, arr, context=None, return_scalar=False)

    (gh-25408)

  • Arrays of 2-dimensional vectors for np.cross have been deprecated.
    Use arrays of 3-dimensional vectors instead.

    (gh-24818)

  • np.dtype("a") alias for np.dtype(np.bytes_) was deprecated. Use
    np.dtype("S") alias instead.

    (gh-24854)

  • Use of keyword arguments x and y with functions
    assert_array_equal and assert_array_almost_equal has been
    deprecated. Pass the first two arguments as positional arguments
    instead.

    (gh-24978)

numpy.fft deprecations for n-D transforms with None values in arguments

Using fftn, ifftn, rfftn, irfftn, fft2, ifft2, rfft2 or
irfft2 with the s parameter set to a value that is not None and
the axes parameter set to None has been deprecated, in line with the
array API standard. To retain current behaviour, pass a sequence [0,
..., k-1] to axes for an array of dimension k.

Furthermore, passing an array to s which contains None values is
deprecated as the parameter is documented to accept a sequence of
integers in both the NumPy docs and the array API specification. To use
the default behaviour of the corresponding 1-D transform, pass the value
matching the default for its n parameter. To use the default behaviour
for every axis, the s argument can be omitted.

(gh-25495)

np.linalg.lstsq now defaults to a new rcond value

numpy.linalg.lstsq now uses the new rcond value of the
machine precision times max(M, N). Previously, the machine precision
was used but a FutureWarning was given to notify that this change will
happen eventually. That old behavior can still be achieved by passing
rcond=-1.

(gh-25721)

Expired deprecations

  • The np.core.umath_tests submodule has been removed from the public
    API. (Deprecated in NumPy 1.15)

    (gh-23809)

  • The PyDataMem_SetEventHook deprecation has expired and it is
    removed. Use tracemalloc and the np.lib.tracemalloc_domain
    domain. (Deprecated in NumPy 1.23)

    (gh-23921)

  • The deprecation of set_numeric_ops and the C functions
    PyArray_SetNumericOps and PyArray_GetNumericOps has been expired
    and the functions removed. (Deprecated in NumPy 1.16)

    (gh-23998)

  • The fasttake, fastclip, and fastputmask ArrFuncs deprecation
    is now finalized.

  • The deprecated function fastCopyAndTranspose and its C counterpart
    are now removed.

  • The deprecation of PyArray_ScalarFromObject is now finalized.

    (gh-24312)

  • np.msort has been removed. For a replacement, np.sort(a, axis=0)
    should be used instead.

    (gh-24494)

  • np.dtype(("f8", 1) will now return a shape 1 subarray dtype rather
    than a non-subarray one.

    (gh-25761)

  • Assigning to the .data attribute of an ndarray is disallowed and
    will raise.

  • np.binary_repr(a, width) will raise if width is too small.

  • Using NPY_CHAR in PyArray_DescrFromType() will raise, use
    NPY_STRING NPY_UNICODE, or NPY_VSTRING instead.

    (gh-25794)

Compatibility notes

loadtxt and genfromtxt default encoding changed

loadtxt and genfromtxt now both default to encoding=None which may
mainly modify how converters work. These will now be passed str
rather than bytes. Pass the encoding explicitly to always get the new
or old behavior. For genfromtxt the change also means that returned
values will now be unicode strings rather than bytes.

(gh-25158)

f2py compatibility notes

  • f2py will no longer accept ambiguous -m and .pyf CLI
    combinations. When more than one .pyf file is passed, an error is
    raised. When both -m and a .pyf is passed, a warning is emitted
    and the -m provided name is ignored.

    (gh-25181)

  • The f2py.compile() helper has been removed because it leaked
    memory, has been marked as experimental for several years now, and
    was implemented as a thin subprocess.run wrapper. It was also one
    of the test bottlenecks. See
    gh-25122 for the full
    rationale. It also used several np.distutils features which are
    too fragile to be ported to work with meson.

  • Users are urged to replace calls to f2py.compile with calls to
    subprocess.run("python", "-m", "numpy.f2py",... instead, and to
    use environment variables to interact with meson. Native
    files
    are also an
    option.

    (gh-25193)

Minor changes in behavior of sorting functions

Due to algorithmic changes and use of SIMD code, sorting functions with
methods that aren't stable may return slightly different results in
2.0.0 compared to 1.26.x. This includes the default method of
numpy.argsort and numpy.argpartition.

Removed ambiguity when broadcasting in np.solve

The broadcasting rules for np.solve(a, b) were ambiguous when b had
1 fewer dimensions than a. This has been resolved in a
backward-incompatible way and is now compliant with the Array API. The
old behaviour can be reconstructed by using
np.solve(a, b[..., None])[..., 0].

(gh-25914)

Modified representation for Polynomial

The representation method for
numpy.polynomial.polynomial.Polynomial was updated to
include the domain in the representation. The plain text and latex
representations are now consistent. For example the output of
str(np.polynomial.Polynomial([1, 1], domain=[.1, .2])) used to be
1.0 + 1.0 x, but now is 1.0 + 1.0 (-3.0000000000000004 + 20.0 x).

(gh-21760)

C API changes

  • The PyArray_CGT, PyArray_CLT, PyArray_CGE, PyArray_CLE,
    PyArray_CEQ, PyArray_CNE macros have been removed.

  • PyArray_MIN and PyArray_MAX have been moved from
    ndarraytypes.h to npy_math.h.

    (gh-24258)

  • A C API for working with numpy.dtypes.StringDType
    arrays has been exposed. This includes functions for acquiring and
    releasing mutexes which lock access to the string data, as well as
    packing and unpacking UTF-8 bytestreams from array entries.

  • NPY_NTYPES has been renamed to NPY_NTYPES_LEGACY as it does not
    include new NumPy built-in DTypes. In particular the new string
    DType will likely not work correctly with code that handles legacy
    DTypes.

    (gh-25347)

  • The C-API now only exports the static inline function versions of
    the array accessors (previously this depended on using "deprecated
    API"). While we discourage it, the struct fields can still be used
    directly.

    (gh-25789)

  • NumPy now defines PyArray_Pack to set an individual memory address.
    Unlike PyArray_SETITEM this function is equivalent to setting an
    individual array item and does not require a NumPy array input.

    (gh-25954)

  • The ->f slot has been removed from PyArray_Descr. If you use this slot,
    replace accessing it with PyDataType_GetArrFuncs (see its documentation
    and the numpy-2-migration-guide). In some cases using other functions
    like PyArray_GETITEM may be an alternatives.

  • PyArray_GETITEM and PyArray_SETITEM now require the import of
    the NumPy API table to be used and are no longer defined in
    ndarraytypes.h.

    (gh-25812)

  • Due to runtime dependencies, the definition for functionality
    accessing the dtype flags was moved from numpy/ndarraytypes.h and
    is only available after including numpy/ndarrayobject.h as it
    requires import_array(). This includes PyDataType_FLAGCHK,
    PyDataType_REFCHK and NPY_BEGIN_THREADS_DESCR.

  • The dtype flags on PyArray_Descr must now be accessed through the
    PyDataType_FLAGS inline function to be compatible with both 1.x
    and 2.x. This function is defined in npy_2_compat.h to allow
    backporting. Most or all users should use PyDataType_FLAGCHK which
    is available on 1.x and does not require backporting. Cython users
    should use Cython 3. Otherwise access will go through Python unless
    they use PyDataType_FLAGCHK instead.

    (gh-25816)

Datetime functionality exposed in the C API and Cython bindings

The functions NpyDatetime_ConvertDatetime64ToDatetimeStruct,
NpyDatetime_ConvertDatetimeStructToDatetime64,
NpyDatetime_ConvertPyDateTimeToDatetimeStruct,
NpyDatetime_GetDatetimeISO8601StrLen,
NpyDatetime_MakeISO8601Datetime, and
NpyDatetime_ParseISO8601Datetime have been added to the C API to
facilitate converting between strings, Python datetimes, and NumPy
datetimes in external libraries.

(gh-21199)

Const correctness for the generalized ufunc C API

The NumPy C API's functions for constructing generalized ufuncs
(PyUFunc_FromFuncAndData, PyUFunc_FromFuncAndDataAndSignature,
PyUFunc_FromFuncAndDataAndSignatureAndIdentity) take types and
data arguments that are not modified by NumPy's internals. Like the
name and doc arguments, third-party Python extension modules are
likely to supply these arguments from static constants. The types and
data arguments are now const-correct: they are declared as
const char *types and void *const *data, respectively. C code should
not be affected, but C++ code may be.

(gh-23847)

Larger NPY_MAXDIMS and NPY_MAXARGS, NPY_RAVEL_AXIS introduced

NPY_MAXDIMS is now 64, you may want to review its use. This is usually
used in a stack allocation, where the increase should be safe. However,
we do encourage generally to remove any use of NPY_MAXDIMS and
NPY_MAXARGS to eventually allow removing the constraint completely.
For the conversion helper and C-API functions mirroring Python ones such as
take, NPY_MAXDIMS was used to mean axis=None. Such usage must be replaced
with NPY_RAVEL_AXIS. See also migration_maxdims.

(gh-25149)

NPY_MAXARGS not constant and PyArrayMultiIterObject size change

Since NPY_MAXARGS was increased, it is now a runtime constant and not
compile-time constant anymore. We expect almost no users to notice this.
But if used for stack allocations it now must be replaced with a custom
constant using NPY_MAXARGS as an additional runtime check.

The sizeof(PyArrayMultiIterObject) no longer includes the full size of
the object. We expect nobody to notice this change. It was necessary to
avoid issues with Cython.

(gh-25271)

Required changes for custom legacy user dtypes

In order to improve our DTypes it is unfortunately necessary to break
the ABI, which requires some changes for dtypes registered with
PyArray_RegisterDataType. Please see the documentation of
PyArray_RegisterDataType for how to adapt your code and achieve
compatibility with both 1.x and 2.x.

(gh-25792)

New Public DType API

The C implementation of the NEP 42 DType API is now public. While the
DType API has shipped in NumPy for a few versions, it was only usable in
sessions with a special environment variable set. It is now possible to
write custom DTypes outside of NumPy using the new DType API and the
normal import_array() mechanism for importing the numpy C API.

See dtype-api for more details about the API. As always with a new feature,
please report any bugs you run into implementing or using a new DType. It is
likely that downstream C code that works with dtypes will need to be updated to
work correctly with new DTypes.

(gh-25754)

New C-API import functions

We have now added PyArray_ImportNumPyAPI and PyUFunc_ImportUFuncAPI
as static inline functions to import the NumPy C-API tables. The new
functions have two advantages over import_array and import_ufunc:

  • They check whether the import was already performed and are
    light-weight if not, allowing to add them judiciously (although this
    is not preferable in most cases).
  • The old mechanisms were macros rather than functions which included
    a return statement.

The PyArray_ImportNumPyAPI() function is included in npy_2_compat.h
for simpler backporting.

(gh-25866)

Structured dtype information access through functions

The dtype structures fields c_metadata, names, fields, and
subarray must now be accessed through new functions following the same
names, such as PyDataType_NAMES. Direct access of the fields is not
valid as they do not exist for all PyArray_Descr instances. The
metadata field is kept, but the macro version should also be
preferred.

(gh-25802)

Descriptor elsize and alignment access

Unless compiling only with NumPy 2 support, the elsize and aligment
fields must now be accessed via PyDataType_ELSIZE,
PyDataType_SET_ELSIZE, and PyDataType_ALIGNMENT. In cases where the
descriptor is attached to an array, we advise using PyArray_ITEMSIZE
as it exists on all NumPy versions. Please see
migration_c_descr for more information.

(gh-25943)

NumPy 2.0 C API removals

  • npy_interrupt.h and the corresponding macros like NPY_SIGINT_ON
    have been removed. We recommend querying PyErr_CheckSignals() or
    PyOS_InterruptOccurred() periodically (these do currently require
    holding the GIL though).

  • The noprefix.h header has been removed. Replace missing symbols
    with their prefixed counterparts (usually an added NPY_ or
    npy_).

    (gh-23919)

  • PyUFunc_GetPyVals, PyUFunc_handlefperr, and PyUFunc_checkfperr
    have been removed. If needed, a new backwards compatible function to
    raise floating point errors could be restored. Reason for removal:
    there are no known users and the functions would have made
    with np.errstate() fixes much more difficult).

    (gh-23922)

  • The numpy/old_defines.h which was part of the API deprecated since
    NumPy 1.7 has been removed. This removes macros of the form
    PyArray_CONSTANT. The
    replace_old_macros.sed
    script may be useful to convert them to the NPY_CONSTANT version.

    (gh-24011)

  • The legacy_inner_loop_selector member of the ufunc struct is
    removed to simplify improvements to the dispatching system. There
    are no known users overriding or directly accessing this member.

    (gh-24271)

  • NPY_INTPLTR has been removed to avoid confusion (see intp
    redefinition).

    (gh-24888)

  • The advanced indexing MapIter and related API has been removed.
    The (truly) public part of it was not well tested and had only one
    known user (Theano). Making it private will simplify improvements to
    speed up ufunc.at, make advanced indexing more maintainable, and
    was important for increasing the maximum number of dimensions of
    arrays to 64. Please let us know if this API is important to you so
    we can find a solution together.

    (gh-25138)

  • The NPY_MAX_ELSIZE macro has been removed, as it only ever
    reflected builtin numeric types and served no internal purpose.

    (gh-25149)

  • PyArray_REFCNT and NPY_REFCOUNT are removed. Use Py_REFCNT
    instead.

    (gh-25156)

  • PyArrayFlags_Type and PyArray_NewFlagsObject as well as
    PyArrayFlagsObject are private now. There is no known use-case;
    use the Python API if needed.

  • PyArray_MoveInto, PyArray_CastTo, PyArray_CastAnyTo are
    removed use PyArray_CopyInto and if absolutely needed
    PyArray_CopyAnyInto (the latter does a flat copy).

  • PyArray_FillObjectArray is removed, its only true use was for
    implementing np.empty. Create a new empty array or use
    PyArray_FillWithScalar() (decrefs existing objects).

  • PyArray_CompareUCS4 and PyArray_CompareString are removed. Use
    the standard C string comparison functions.

  • PyArray_ISPYTHON is removed as it is misleading, has no known
    use-cases, and is easy to replace.

  • PyArray_FieldNames is removed, as it is unclear what it would be
    useful for. It also has incorrect semantics in some possible
    use-cases.

  • PyArray_TypestrConvert is removed, since it seems a misnomer and
    unlikely to be used by anyone. If you know the size or are limited
    to few types, just use it explicitly, otherwise go via Python
    strings.

    (gh-25292)

  • PyDataType_GetDatetimeMetaData is removed, it did not actually do
    anything since at least NumPy 1.7.

    (gh-25802)

  • PyArray_GetCastFunc is removed. Note that custom legacy user
    dtypes can still provide a castfunc as their implementation, but any
    access to them is now removed. The reason for this is that NumPy
    never used these internally for many years. If you use simple
    numeric types, please just use C casts directly. In case you require
    an alternative, please let us know so we can create new API such as
    PyArray_CastBuffer() which could use old or new cast functions
    depending on the NumPy version.

    (gh-25161)

New Features

np.add was extended to work with unicode and bytes dtypes.

(gh-24858)

A new bitwise_count function

This new function counts the number of 1-bits in a number.
numpy.bitwise_count works on all the numpy integer types
and integer-like objects.

>>> a = np.array([2**i - 1 for i in range(16)])
>>> np.bitwise_count(a)
array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15],
      dtype=uint8)

(gh-19355)

macOS Accelerate support, including the ILP64

Support for the updated Accelerate BLAS/LAPACK library, including ILP64
(64-bit integer) support, in macOS 13.3 has been added. This brings
arm64 support, and significant performance improvements of up to 10x for
commonly used linear algebra operations. When Accelerate is selected at
build time, or if no explicit BLAS library selection is done, the 13.3+
version will automatically be used if available.

(gh-24053)

Binary wheels are also available. On macOS >=14.0, users who install
NumPy from PyPI will get wheels built against Accelerate rather than
OpenBLAS.

(gh-25255)

Option to use weights for quantile and percentile functions

A weights keyword is now available for numpy.quantile, numpy.percentile,
numpy.nanquantile and numpy.nanpercentile. Only method="inverted_cdf"
supports weights.

(gh-24254)

Improved CPU optimization tracking

A new tracer mechanism is available which enables tracking of the
enabled targets for each optimized function (i.e., that uses
hardware-specific SIMD instructions) in the NumPy library. With this
enhancement, it becomes possible to precisely monitor the enabled CPU
dispatch targets for the dispatched functions.

A new function named opt_func_info has been added to the new namespace
numpy.lib.introspect, offering this tracing capability. This function allows
you to retrieve information about the enabled targets based on function names
and data type signatures.

(gh-24420)

A new Meson backend for f2py

f2py in compile mode (i.e. f2py -c) now accepts the
--backend meson option. This is the default option for Python >=3.12.
For older Python versions, f2py will still default to
--backend distutils.

To support this in realistic use-cases, in compile mode f2py takes a
--dep flag one or many times which maps to dependency() calls in the
meson backend, and does nothing in the distutils backend.

There are no changes for users of f2py only as a code generator, i.e.
without -c.

(gh-24532)

bind(c) support for f2py

Both functions and subroutines can be annotated with bind(c). f2py
will handle both the correct type mapping, and preserve the unique label
for other C interfaces.

Note: bind(c, name = 'routine_name_other_than_fortran_routine') is
not honored by the f2py bindings by design, since bind(c) with the
name is meant to guarantee only the same name in C and Fortran, not in
Python and Fortran.

(gh-24555)

A new strict option for several testing functions

The strict keyword is now available for numpy.testing.assert_allclose,
numpy.testing.assert_equal, and numpy.testing.assert_array_less. Setting
strict=True will disable the broadcasting behaviour for scalars and ensure
that input arrays have the same data type.

(gh-24680,
gh-24770,
gh-24775)

Add np.core.umath.find and np.core.umath.rfind UFuncs

Add two find and rfind UFuncs that operate on unicode or byte
strings and are used in np.char. They operate similar to str.find
and str.rfind.

(gh-24868)

diagonal and trace for numpy.linalg

numpy.linalg.diagonal and numpy.linalg.trace have been added, which are
array API standard-compatible variants of numpy.diagonal and numpy.trace.
They differ in the default axis selection which define 2-D sub-arrays.

(gh-24887)

New long and ulong dtypes

numpy.long and numpy.ulong have been added as NumPy integers mapping to
C's long and unsigned long. Prior to NumPy 1.24, numpy.long was an alias
to Python's int.

(gh-24922)

svdvals for numpy.linalg

numpy.linalg.svdvals has been added. It computes singular values for (a stack
of) matrices. Executing np.svdvals(x) is the same as calling np.svd(x, compute_uv=False, hermitian=False). This function is compatible with the array
API standard.

(gh-24940)

A new isdtype function

numpy.isdtype was added to provide a canonical way to classify NumPy's
dtypes in compliance with the array API standard.

(gh-25054)

A new astype function

numpy.astype was added to provide an array API standard-compatible
alternative to the numpy.ndarray.astype method.

(gh-25079)

Array API compatible functions' aliases

13 aliases for existing functions were added to improve compatibility
with the array API standard:

  • Trigonometry: acos, acosh, asin, asinh, atan, atanh,
    atan2.
  • Bitwise: bitwise_left_shift, bitwise_invert,
    bitwise_right_shift.
  • Misc: concat, permute_dims, pow.
  • In numpy.linalg: tensordot, matmul.

(gh-25086)

New unique_* functions

The numpy.unique_all, numpy.unique_counts, numpy.unique_inverse, and
numpy.unique_values functions have been added. They provide functionality of
numpy.unique with different sets of flags. They are array API
standard-compatible, and because the number of arrays they return does not
depend on the values of input arguments, they are easier to target for JIT
compilation.

(gh-25088)

Matrix transpose support for ndarrays

NumPy now offers support for calculating the matrix transpose of an
array (or stack of arrays). The matrix transpose is equivalent to
swapping the last two axes of an array. Both np.ndarray and
np.ma.MaskedArray now expose a .mT attribute, and there is a
matching new numpy.matrix_transpose function.

(gh-23762)

Array API compatible functions for numpy.linalg

Six new functions and two aliases were added to improve compatibility
with the Array API standard for `numpy.linalg`:

  • numpy.linalg.matrix_norm - Computes the matrix norm of
    a matrix (or a stack of matrices).

  • numpy.linalg.vector_norm - Computes the vector norm of
    a vector (or batch of vectors).

  • numpy.vecdot - Computes the (vector) dot product of
    two arrays.

  • numpy.linalg.vecdot - An alias for
    numpy.vecdot.

  • numpy.linalg.matrix_transpose - An alias for
    numpy.matrix_transpose.

    (gh-25155)

  • numpy.linalg.outer has been added. It computes the
    outer product of two vectors. It differs from
    numpy.outer by accepting one-dimensional arrays only.
    This function is compatible with the array API standard.

    (gh-25101)

  • numpy.linalg.cross has been added. It computes the
    cross product of two (arrays of) 3-dimensional vectors. It differs
    from numpy.cross by accepting three-dimensional
    vectors only. This function is compatible with the array API
    standard.

    (gh-25145)

A correction argument for var and std

A correction argument was added to numpy.var and numpy.std, which is an
array API standard compatible alternative to ddof. As both arguments serve a
similar purpose, only one of them can be provided at the same time.

(gh-25169)

ndarray.device and ndarray.to_device

An ndarray.device attribute and ndarray.to_device method were added
to numpy.ndarray for array API standard compatibility.

Additionally, device keyword-only arguments were added to:
numpy.asarray, numpy.arange, numpy.empty, numpy.empty_like,
numpy.eye, numpy.full, numpy.full_like, numpy.linspace, numpy.ones,
numpy.ones_like, numpy.zeros, and numpy.zeros_like.

For all these new arguments, only device="cpu" is supported.

(gh-25233)

StringDType has been added to NumPy

We have added a new variable-width UTF-8 encoded string data type, implementing
a "NumPy array of Python strings", including support for a user-provided
missing data sentinel. It is intended as a drop-in replacement for arrays of
Python strings and missing data sentinels using the object dtype. See
NEP 55 and the documentation
of stringdtype for more details.

(gh-25347)

New keywords for cholesky and pinv

The upper and rtol keywords were added to
numpy.linalg.cholesky and numpy.linalg.pinv,
respectively, to improve array API standard compatibility.

For numpy.linalg.pinv, if neither rcond nor rtol is
specified, the rcond's default is used. We plan to deprecate and
remove rcond in the future.

(gh-25388)

New keywords for sort, argsort and linalg.matrix_rank

New keyword parameters were added to improve array API standard
compatibility:

  • rtol was added to numpy.linalg.matrix_rank.
  • stable was added to numpy.sort and
    numpy.argsort.

(gh-25437)

New numpy.strings namespace for string ufuncs

NumPy now implements some string operations as ufuncs. The old np.char
namespace is still available, and where possible the string manipulation
functions in that namespace have been updated to use the new ufuncs,
substantially improving their performance.

Where possible, we suggest updating code to use functions in
np.strings instead of np.char. In the future we may deprecate
np.char in favor of np.strings.

(gh-25463)

numpy.fft support for different precisions and in-place calculations

The various FFT routines in numpy.fft now do their
calculations natively in float, double, or long double precision,
depending on the input precision, instead of always calculating in
double precision. Hence, the calculation will now be less precise for
single and more precise for long double precision. The data type of the
output array will now be adjusted accordingly.

Furthermore, all FFT routines have gained an out argument that can be
used for in-place calculations.

(gh-25536)

configtool and pkg-config support

A new numpy-config CLI script is available that can be queried for the
NumPy version and for compile flags needed to use the NumPy C API. This
will allow build systems to better support the use of NumPy as a
dependency. Also, a numpy.pc pkg-config file is now included with
Numpy. In order to find its location for use with PKG_CONFIG_PATH, use
numpy-config --pkgconfigdir.

(gh-25730)

Array API standard support in the main namespace

The main numpy namespace now supports the array API standard. See
array-api-standard-compatibility for
details.

(gh-25911)

Improvements

Strings are now supported by any, all, and the logical ufuncs.

(gh-25651)

Integer sequences as the shape argument for memmap

numpy.memmap can now be created with any integer sequence
as the shape argument, such as a list or numpy array of integers.
Previously, only the types of tuple and int could be used without
raising an error.

(gh-23729)

errstate is now faster and context safe

The numpy.errstate context manager/decorator is now faster
and safer. Previously, it was not context safe and had (rare) issues
with thread-safety.

(gh-23936)

AArch64 quicksort speed improved by using Highway's VQSort

The first introduction of the Google Highway library, using VQSort on
AArch64. Execution time is improved by up to 16x in some cases, see the
PR for benchmark results. Extensions to other platforms will be done in
the future.

(gh-24018)

Complex types - underlying C type changes

  • The underlying C types for all of NumPy's complex types have been
    changed to use C99 complex types.

  • While this change does not affect the memory layout of complex
    types, it changes the API to be used to directly retrieve or write
    the real or complex part of the complex number, since direct field
    access (as in c.real or c.imag) is no longer an option. You can
    now use utilities provided in numpy/npy_math.h to do these
    operations, like this:

    npy_cdouble c;
    npy_csetreal(&c, 1.0);
    npy_csetimag(&c, 0.0);
    printf("%d + %di\n", npy_creal(c), npy_cimag(c));
    
  • To ease cross-version compatibility, equivalent macros and a
    compatibility layer have been added which can be used by downstream
    packages to continue to support both NumPy 1.x and 2.x. See
    complex-numbers for more info.

  • numpy/npy_common.h now includes complex.h, which means that
    complex is now a reserved keyword.

(gh-24085)

iso_c_binding support and improved common blocks for f2py

Previously, users would have to define their own custom f2cmap file to
use type mappings defined by the Fortran2003 iso_c_binding intrinsic
module. These type maps are now natively supported by f2py

(gh-24555)

f2py now handles common blocks which have kind specifications from
modules. This further expands the usability of intrinsics like
iso_fortran_env and iso_c_binding.

(gh-25186)

Call str automatically on third argument to functions like assert_equal

The third argument to functions like
numpy.testing.assert_equal now has str called on it
automatically. This way it mimics the built-in assert statement, where
assert_equal(a, b, obj) works like assert a == b, obj.

(gh-24877)

Support for array-like atol/rtol in isclose, allclose

The keywords atol and rtol in numpy.isclose and
numpy.allclose now accept both scalars and arrays. An
array, if given, must broadcast to the shapes of the first two array
arguments.

(gh-24878)

Consistent failure messages in test functions

Previously, some numpy.testing assertions printed messages
that referred to the actual and desired results as x and y. Now,
these values are consistently referred to as ACTUAL and DESIRED.

(gh-24931)

n-D FFT transforms allow s[i] == -1

The numpy.fft.fftn, numpy.fft.ifftn,
numpy.fft.rfftn, numpy.fft.irfftn,
numpy.fft.fft2, numpy.fft.ifft2,
numpy.fft.rfft2 and numpy.fft.irfft2
functions now use the whole input array along the axis i if
s[i] == -1, in line with the array API standard.

(gh-25495)

Guard PyArrayScalar_VAL and PyUnicodeScalarObject for the limited API

PyUnicodeScalarObject holds a PyUnicodeObject, which is not
available when using Py_LIMITED_API. Add guards to hide it and
consequently also make the PyArrayScalar_VAL macro hidden.

(gh-25531)

Changes

  • np.gradient() now returns a tuple rather than a list making the
    return value immutable.

    (gh-23861)

  • Being fully context and thread-safe, np.errstate can only be
    entered once now.

  • np.setbufsize is now tied to np.errstate(): leaving an
    np.errstate context will also reset the bufsize.

    (gh-23936)

  • A new public np.lib.array_utils submodule has been introduced and
    it currently contains three functions: byte_bounds (moved from
    np.lib.utils), normalize_axis_tuple and normalize_axis_index.

    (gh-24540)

  • Introduce numpy.bool as the new canonical name for
    NumPy's boolean dtype, and make numpy.bool\_ an alias
    to it. Note that until NumPy 1.24, np.bool was an alias to
    Python's builtin bool. The new name helps with array API standard
    compatibility and is a more intuitive name.

    (gh-25080)

  • The dtype.flags value was previously stored as a signed integer.
    This means that the aligned dtype struct flag lead to negative flags
    being set (-128 rather than 128). This flag is now stored unsigned
    (positive). Code which checks flags manually may need to adapt. This
    may include code compiled with Cython 0.29.x.

    (gh-25816)

Representation of NumPy scalars changed

As per NEP 51, the scalar representation has been updated to include the type
information to avoid confusion with Python scalars.

Scalars are now printed as np.float64(3.0) rather than just 3.0.
This may disrupt workflows that store representations of numbers (e.g.,
to files) making it harder to read them. They should be stored as
explicit strings, for example by using str() or f"{scalar!s}". For
the time being, affected users can use
np.set_printoptions(legacy="1.25") to get the old behavior (with
possibly a few exceptions). Documentation of downstream projects may
require larger updates, if code snippets are tested. We are working on
tooling for
doctest-plus
to facilitate updates.

(gh-22449)

Truthiness of NumPy strings changed

NumPy strings previously were inconsistent about how they defined if the
string is True or False and the definition did not match the one
used by Python. Strings are now considered True when they are
non-empty and False when they are empty. This changes the following
distinct cases:

  • Casts from string to boolean were previously roughly equivalent to
    string_array.astype(np.int64).astype(bool), meaning that only
    valid integers could be cast. Now a string of "0" will be
    considered True since it is not empty. If you need the old
    behavior, you may use the above step (casting to integer first) or
    string_array == "0" (if the input is only ever 0 or 1). To get
    the new result on old NumPy versions use string_array != "".
  • np.nonzero(string_array) previously ignored whitespace so that a
    string only containing whitespace was considered False. Whitespace
    is now considered True.

This change does not affect np.loadtxt, np.fromstring, or
np.genfromtxt. The first two still use the integer definition, while
genfromtxt continues to match for "true" (ignoring case). However,
if np.bool_ is used as a converter the result will change.

The change does affect np.fromregex as it uses direct assignments.

(gh-23871)

A mean keyword was added to var and std function

Often when the standard deviation is needed the mean is also needed. The
same holds for the variance and the mean. Until now the mean is then
calculated twice, the change introduced here for the numpy.var and
numpy.std functions allows for passing in a precalculated mean as an keyword
argument. See the docstrings for details and an example illustrating the
speed-up.

(gh-24126)

Remove datetime64 deprecation warning when constructing with timezone

The numpy.datetime64 method now issues a UserWarning rather than a
DeprecationWarning whenever a timezone is included in the datetime string that
is provided.

(gh-24193)

Default integer dtype is now 64-bit on 64-bit Windows

The default NumPy integer is now 64-bit on all 64-bit systems as the
historic 32-bit default on Windows was a common source of issues. Most
users should not notice this. The main issues may occur with code
interfacing with libraries written in a compiled language like C. For
more information see migration_windows_int64.

(gh-24224)

Renamed numpy.core to numpy._core

Accessing numpy.core now emits a DeprecationWarning. In practice we
have found that most downstream usage of numpy.core was to access
functionality that is available in the main numpy namespace. If for
some reason you are using functionality in numpy.core that is not
available in the main numpy namespace, this means you are likely using
private NumPy internals. You can still access these internals via
numpy._core without a deprecation warning but we do not provide any
backward compatibility guarantees for NumPy internals. Please open an
issue if you think a mistake was made and something needs to be made
public.

(gh-24634)

The "relaxed strides" debug build option, which was previously enabled
through the NPY_RELAXED_STRIDES_DEBUG environment variable or the
-Drelaxed-strides-debug config-settings flag has been removed.

(gh-24717)

Redefinition of np.intp/np.uintp (almost never a change)

Due to the actual use of these types almost always matching the use of
size_t/Py_ssize_t this is now the definition in C. Previously, it
matched intptr_t and uintptr_t which would often have been subtly
incorrect. This has no effect on the vast majority of machines since the
size of these types only differ on extremely niche platforms.

However, it means that:

  • Pointers may not necessarily fit into an intp typed array anymore.
    The p and P character codes can still be used, however.
  • Creating intptr_t or uintptr_t typed arrays in C remains
    possible in a cross-platform way via PyArray_DescrFromType('p').
  • The new character codes nN were introduced.
  • It is now correct to use the Python C-API functions when parsing to
    npy_intp typed arguments.

(gh-24888)

numpy.fft.helper made private

numpy.fft.helper was renamed to numpy.fft._helper to indicate that
it is a private submodule. All public functions exported by it should be
accessed from numpy.fft.

(gh-24945)

numpy.linalg.linalg made private

numpy.linalg.linalg was renamed to numpy.linalg._linalg to indicate
that it is a private submodule. All public functions exported by it
should be accessed from numpy.linalg.

(gh-24946)

Out-of-bound axis not the same as axis=None

In some cases axis=32 or for concatenate any large value was the same
as axis=None. Except for concatenate this was deprecate. Any out of
bound axis value will now error, make sure to use axis=None.

(gh-25149)

New copy keyword meaning for array and asarray constructors

Now numpy.array and numpy.asarray support
three values for copy parameter:

  • None - A copy will only be made if it is necessary.
  • True - Always make a copy.
  • False - Never make a copy. If a copy is required a ValueError is
    raised.

The meaning of False changed as it now raises an exception if a copy
is needed.

(gh-25168)

The __array__ special method now takes a copy keyword argument.

NumPy will pass copy to the __array__ special method in situations
where it would be set to a non-default value (e.g. in a call to
np.asarray(some_object, copy=False)). Currently, if an unexpected
keyword argument error is raised after this, NumPy will print a warning
and re-try without the copy keyword argument. Implementations of
objects implementing the __array__ protocol should accept a copy
keyword argument with the same meaning as when passed to
numpy.array or numpy.asarray.

(gh-25168)

Cleanup of initialization of numpy.dtype with strings with commas

The interpretation of strings with commas is changed slightly, in that a
trailing comma will now always create a structured dtype. E.g., where
previously np.dtype("i") and np.dtype("i,") were treated as
identical, now np.dtype("i,") will create a structured dtype, with a
single field. This is analogous to np.dtype("i,i") creating a
structured dtype with two fields, and makes the behaviour consistent
with that expected of tuples.

At the same time, the use of single number surrounded by parenthesis to
indicate a sub-array shape, like in np.dtype("(2)i,"), is deprecated.
Instead; one should use np.dtype("(2,)i") or np.dtype("2i").
Eventually, using a number in parentheses will raise an exception, like
is the case for initializations without a comma, like
np.dtype("(2)i").

(gh-25434)

Change in how complex sign is calculated

Following the array API standard, the complex sign is now calculated as
z / |z| (instead of the rather less logical case where the sign of the
real part was taken, unless the real part was zero, in which case the
sign of the imaginary part was returned). Like for real numbers, zero is
returned if z==0.

(gh-25441)

Return types of functions that returned a list of arrays

Functions that returned a list of ndarrays have been changed to return a
tuple of ndarrays instead. Returning tuples consistently whenever a
sequence of arrays is returned makes it easier for JIT compilers like
Numba, as well as for static type checkers in some cases, to support
these functions. Changed functions are: numpy.atleast_1d, numpy.atleast_2d,
numpy.atleast_3d, numpy.broadcast_arrays, numpy.meshgrid,
numpy.ogrid, numpy.histogramdd.

np.unique return_inverse shape for multi-dimensional inputs

When multi-dimensional inputs are passed to np.unique with
return_inverse=True, the unique_inverse output is now shaped such
that the input can be reconstructed directly using
np.take(unique, unique_inverse) when axis=None, and
np.take_along_axis(unique, unique_inverse, axis=axis) otherwise.

(gh-25553,
gh-25570)

any and all return booleans for object arrays

The any and all functions and methods now return booleans also for
object arrays. Previously, they did a reduction which behaved like the
Python or and and operators which evaluates to one of the arguments.
You can use np.logical_or.reduce and np.logical_and.reduce to
achieve the previous behavior.

(gh-25712)

Content from release note snippets in doc/release/upcoming_changes:

Checksums

MD5

b2f97f907cc640f5f619ea4ebd1231d3  numpy-2.0.0b1-cp310-cp310-macosx_10_9_x86_64.whl
db158043b6fad6e523e23b3eb2de5d88  numpy-2.0.0b1-cp310-cp310-macosx_11_0_arm64.whl
39086961c062d97c5b42da057b9b1947  numpy-2.0.0b1-cp310-cp310-macosx_14_0_arm64.whl
3362d35bf69b852b98b41b8373253a0f  numpy-2.0.0b1-cp310-cp310-macosx_14_0_x86_64.whl
66e907969e32ec43e887cabcc1884763  numpy-2.0.0b1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
b8d1bece144e3b6aae641d44821f815f  numpy-2.0.0b1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
96ab156ec312bb451e8c5e19de4a28b7  numpy-2.0.0b1-cp310-cp310-musllinux_1_1_aarch64.whl
c04819a4f3395b81d124ffc6330925e9  numpy-2.0.0b1-cp310-cp310-musllinux_1_1_x86_64.whl
6af68b8eb8fe583ffabab9bd7da1c620  numpy-2.0.0b1-cp310-cp310-win32.whl
3b8a9514e5795985bcba20e213d55b54  numpy-2.0.0b1-cp310-cp310-win_amd64.whl
0128ad9249f70d97a057a23e0cef1515  numpy-2.0.0b1-cp311-cp311-macosx_10_9_x86_64.whl
612c018a7676ce3747cb863762750e1d  numpy-2.0.0b1-cp311-cp311-macosx_11_0_arm64.whl
6b1480446aff53c71c903fc1248bca94  numpy-2.0.0b1-cp311-cp311-macosx_14_0_arm64.whl
8d66a0af99edf30dc9de487b3f8c1639  numpy-2.0.0b1-cp311-cp311-macosx_14_0_x86_64.whl
f9154a0885b2647d7e81f32900390ebb  numpy-2.0.0b1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
9dd14e2b594a2d47eb25ecc759d5adaa  numpy-2.0.0b1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
8434d07fc4eb80c5df9ae5ebf95546eb  numpy-2.0.0b1-cp311-cp311-musllinux_1_1_aarch64.whl
a0402697c93a9d6bc8d979fabd6bf179  numpy-2.0.0b1-cp311-cp311-musllinux_1_1_x86_64.whl
2ba67ffb4b92b54394b6929b3a899cb2  numpy-2.0.0b1-cp311-cp311-win32.whl
d75e2f02c698e492b7b07f0659f9bbe4  numpy-2.0.0b1-cp311-cp311-win_amd64.whl
558fefd135de6fcebe2b94d857a84c32  numpy-2.0.0b1-cp312-cp312-macosx_10_9_x86_64.whl
d684790e4509e7daa99a1aef1d0be536  numpy-2.0.0b1-cp312-cp312-macosx_11_0_arm64.whl
fd5d4f1d1da0cc685c54e9abd2f9dceb  numpy-2.0.0b1-cp312-cp312-macosx_14_0_arm64.whl
65183c1302348d3db60eaf3b62c1e577  numpy-2.0.0b1-cp312-cp312-macosx_14_0_x86_64.whl
305eaf68e214011557303988f4635271  numpy-2.0.0b1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
e3a84e27effd888cf93eb2c1aad759e7  numpy-2.0.0b1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
88eef47ecdd11ac0939291abe0c74b6f  numpy-2.0.0b1-cp312-cp312-musllinux_1_1_aarch64.whl
fd390078c0046c20a659035c1826185f  numpy-2.0.0b1-cp312-cp312-musllinux_1_1_x86_64.whl
23db11989d2d0086ff12655355245a2a  numpy-2.0.0b1-cp312-cp312-win32.whl
323d05ef29a9c8166d865ab221faf7dc  numpy-2.0.0b1-cp312-cp312-win_amd64.whl
f5ad7adf599b65050ccd116802f0265d  numpy-2.0.0b1-cp39-cp39-macosx_10_9_x86_64.whl
89a94dddb18e4210e01ee6ca24012fcb  numpy-2.0.0b1-cp39-cp39-macosx_11_0_arm64.whl
409a537dc5ea249b3e6868dd37932342  numpy-2.0.0b1-cp39-cp39-macosx_14_0_arm64.whl
0db893de846425d58b90f05c1db3d191  numpy-2.0.0b1-cp39-cp39-macosx_14_0_x86_64.whl
c73ba41d166a5f2e72cdc48b8554c6e6  numpy-2.0.0b1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
786236fc9099283255133273535b8de0  numpy-2.0.0b1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
f2e8717957a6b3b37f881e8939a2af37  numpy-2.0.0b1-cp39-cp39-musllinux_1_1_aarch64.whl
dad671b45f6e13c28ead06064b03eaee  numpy-2.0.0b1-cp39-cp39-musllinux_1_1_x86_64.whl
76f8f89ff91d06df684cf47d7ea6d8ab  numpy-2.0.0b1-cp39-cp39-win32.whl
d4dcbd6157783aa0e78710549f13876f  numpy-2.0.0b1-cp39-cp39-win_amd64.whl
41a13de3afff77390b0d1ea3c7e407db  numpy-2.0.0b1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
fc2ff82233376f853161c7f9bc6d44b7  numpy-2.0.0b1-pp39-pypy39_pp73-macosx_14_0_arm64.whl
860609ee9f1f24d4f28fbbcf3d31cdc9  numpy-2.0.0b1-pp39-pypy39_pp73-macosx_14_0_x86_64.whl
2a97175cec7a5b1280ed2a991fea23ff  numpy-2.0.0b1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
1656013175e650e053c15fd886be58f1  numpy-2.0.0b1-pp39-pypy39_pp73-win_amd64.whl
c06e95d7cadfa33a1f4549c9a5dcba05  numpy-2.0.0b1.tar.gz

SHA256

411ed8eb48eb679fc732f22e90c9adb994ec6ad2d9c2f53593325a975f9fa501  numpy-2.0.0b1-cp310-cp310-macosx_10_9_x86_64.whl
f8aca0561166702070ea9abcafd70da44df48be70d16f0a886e359127436fdcc  numpy-2.0.0b1-cp310-cp310-macosx_11_0_arm64.whl
0d217dae0f20a3400c1d80aa8401af9de93b9bb4ea7518b8ba200ff8ff62529e  numpy-2.0.0b1-cp310-cp310-macosx_14_0_arm64.whl
824351cb4cce66c1f8e16c1698c01de8d5e4197461f78197c327281f107fc1b2  numpy-2.0.0b1-cp310-cp310-macosx_14_0_x86_64.whl
cae0959a4f5a9c16896a87a43c9e81384f48b69f835f55050948071488820486  numpy-2.0.0b1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
3d47a42c1e48e46dbbe32e0395f8aa6e8ddd251771ed9ec47fc07aa89b8aac89  numpy-2.0.0b1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
909024f923c019d1b9dca16871844f1c313c422bd430a0b7e4a24a3acb766483  numpy-2.0.0b1-cp310-cp310-musllinux_1_1_aarch64.whl
fc6e82bea99727aeed964808f26bed95323825a75e94c015eb913fb6ec3dbdf8  numpy-2.0.0b1-cp310-cp310-musllinux_1_1_x86_64.whl
36862cad55650afbcb3f0e3a5edc07ba4c1090eb649208a41fadcf82cf1b2966  numpy-2.0.0b1-cp310-cp310-win32.whl
0e6a63c725143a6be0e48effcf01b8361b80ab20e2444704356f9d9db48ba429  numpy-2.0.0b1-cp310-cp310-win_amd64.whl
e6c3ba4bcb6cf3fd4ace244075fa214b4f0c090f12437378200a2de68144c166  numpy-2.0.0b1-cp311-cp311-macosx_10_9_x86_64.whl
89bbb14534e53c6175aabc8449a8bdf83f02da62f13d1b5facbb2fd1fecae2e2  numpy-2.0.0b1-cp311-cp311-macosx_11_0_arm64.whl
b14b6e6ca51afdcfc589cb9d6fb73aedf38009a1a0ecab15f77e3d0e0754cac0  numpy-2.0.0b1-cp311-cp311-macosx_14_0_arm64.whl
ffef68423c1edc5d10321f9787fb9d8c20a36fc08ffdba863d103924d02dadce  numpy-2.0.0b1-cp311-cp311-macosx_14_0_x86_64.whl
7e8725313b8a8aaa9cfac450713b1a74a8d79ae010ee0d0dd97505abf54d247b  numpy-2.0.0b1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
d83e18f1c4164dbcaa01adc8f4a3aebc3c5fa635d2009d8dc1bf53dd7eab0063  numpy-2.0.0b1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
91e37a5bb38c11bde547aefeb79dd382b5d9d1d140931927bca46c9d198e08f3  numpy-2.0.0b1-cp311-cp311-musllinux_1_1_aarch64.whl
d39f1005a627c5960f67b02c1f76f265e0d4219b6d7948a7809dc14443fcbeb6  numpy-2.0.0b1-cp311-cp311-musllinux_1_1_x86_64.whl
3ed4afbcdb8db622b90ef33bf0c0d080f287ec590032f9033be5cbc51e005b66  numpy-2.0.0b1-cp311-cp311-win32.whl
941382abe21d26222310275a91f053386450b5364f1307641d03babfec5b1931  numpy-2.0.0b1-cp311-cp311-win_amd64.whl
a78a38ff86aa651534979d597fdb178c7ae2c9934d95bcc921971ceea14ef54a  numpy-2.0.0b1-cp312-cp312-macosx_10_9_x86_64.whl
e5222fb05011c310d294c40e2b8640c9351aaf3238c0605486a3f041a7befabd  numpy-2.0.0b1-cp312-cp312-macosx_11_0_arm64.whl
0f69c008a8533879ea0480fe11b28154c0dc12567522406f2c887bc549a98865  numpy-2.0.0b1-cp312-cp312-macosx_14_0_arm64.whl
a5b47099876fceefb5ac4d2cfe4ee7337de22253aafe6f2e545b84d100bf9e22  numpy-2.0.0b1-cp312-cp312-macosx_14_0_x86_64.whl
a81816e4dc75351dd1ce2d84f381856b8962eef1757ddfe13007d2a8bb966fda  numpy-2.0.0b1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
3ecb219af16b0dbf58bbe1fdb4d074582f9a99567d85c630cf82c3b40168a15d  numpy-2.0.0b1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
7479d8f43dd78a3bd1c8a3c7c9b06e71639c480a0223c31a4aeb2c7e8fd62151  numpy-2.0.0b1-cp312-cp312-musllinux_1_1_aarch64.whl
1665b832541449c7079ee9d41f334ab832a1d84511cc834c0bc8d98bf96d1df5  numpy-2.0.0b1-cp312-cp312-musllinux_1_1_x86_64.whl
585471edf1f205fb589632581cc7b30c6c0e78d79b3c754739bb62ff568fa587  numpy-2.0.0b1-cp312-cp312-win32.whl
881df25d857873947d54dbed01d98c417f3feb5df86ece719eebf1edbbb2095c  numpy-2.0.0b1-cp312-cp312-win_amd64.whl
797dc478feed31f78bca1c69d9a167c6294599927c184f4e9b569ad8895ca6e5  numpy-2.0.0b1-cp39-cp39-macosx_10_9_x86_64.whl
49cb06682f4588c2553a63445b7e37aec731452fe380c3bd142377783a9ba014  numpy-2.0.0b1-cp39-cp39-macosx_11_0_arm64.whl
5fd7ec50b9650ac0aa4fd318eceb9059ed3c0ab3aa79d5f260a10158521f9770  numpy-2.0.0b1-cp39-cp39-macosx_14_0_arm64.whl
72526252a5d1da5067181bfd3df9cc6d7dcd024b757f5d35e8f1d0c08cb729c1  numpy-2.0.0b1-cp39-cp39-macosx_14_0_x86_64.whl
7870b854823217f34e6258328f46e40f68784f61408deb37a29ca64762c60c10  numpy-2.0.0b1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
26a0978595ac2e8160d27f7537ff94402eaaf3ea7a768e7f99170ed91453d1bf  numpy-2.0.0b1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
5801a93e424c12366d8b0b411dfeb7102f7429f0934059a39b1529f02ea2606b  numpy-2.0.0b1-cp39-cp39-musllinux_1_1_aarch64.whl
2f67038ecdf4b372d81fa00530547a5d04b77da5b1e4fc55f58021f3135331ea  numpy-2.0.0b1-cp39-cp39-musllinux_1_1_x86_64.whl
f32b6ec16518b3ba1a2d3a100d9b413cf24aaeeefdec19f1cddec55cb4a31dac  numpy-2.0.0b1-cp39-cp39-win32.whl
70a22408ed088725fe44a6f55a077d1f704977b262e53d30ba485a01229028a3  numpy-2.0.0b1-cp39-cp39-win_amd64.whl
a69f1624d036953f3f2795f22e6be452ee6d24937ae14f77c2e536589e20caa2  numpy-2.0.0b1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
c27970540ee6b4b8325779cd22eee0283cb9dc6511130ff54e774fcd0a261d4b  numpy-2.0.0b1-pp39-pypy39_pp73-macosx_14_0_arm64.whl
393adcc241ff7010b43e4660710a43c322189ff67461afba18bbaf9f5581b221  numpy-2.0.0b1-pp39-pypy39_pp73-macosx_14_0_x86_64.whl
4205b3efa27b74cb096443bdda178f5032ffc6b41306a7d4a0b903b4b614b146  numpy-2.0.0b1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
52f9cd632f9f5e179e98769d76702ce9a307439f36191607d5ee06cb8a986d01  numpy-2.0.0b1-pp39-pypy39_pp73-win_amd64.whl
e0bb33a37d0d0b9a19cd41a093877f830e06bd4d989341b9792896cf08e629f7  numpy-2.0.0b1.tar.gz
numpy -

Published by charris 9 months ago

NumPy 1.26.4 Release Notes

NumPy 1.26.4 is a maintenance release that fixes bugs and regressions
discovered after the 1.26.3 release. The Python versions supported by
this release are 3.9-3.12. This is the last planned release in the
1.26.x series.

Contributors

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

  • Charles Harris
  • Elliott Sales de Andrade
  • Lucas Colley +
  • Mark Ryan +
  • Matti Picus
  • Nathan Goldbaum
  • Ola x Nilsson +
  • Pieter Eendebak
  • Ralf Gommers
  • Sayed Adel
  • Sebastian Berg
  • Stefan van der Walt
  • Stefano Rivera

Pull requests merged

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

  • #25323: BUG: Restore missing asstr import
  • #25523: MAINT: prepare 1.26.x for further development
  • #25539: BUG: numpy.array_api: fix linalg.cholesky upper decomp...
  • #25584: CI: Bump azure pipeline timeout to 120 minutes
  • #25585: MAINT, BLD: Fix unused inline functions warnings on clang
  • #25599: BLD: include fix for MinGW platform detection
  • #25618: TST: Fix test_numeric on riscv64
  • #25619: BLD: fix building for windows ARM64
  • #25620: MAINT: add newaxis to __all__ in numpy.array_api
  • #25630: BUG: Use large file fallocate on 32 bit linux platforms
  • #25643: TST: Fix test_warning_calls on Python 3.12
  • #25645: TST: Bump pytz to 2023.3.post1
  • #25658: BUG: Fix AVX512 build flags on Intel Classic Compiler
  • #25670: BLD: fix potential issue with escape sequences in __config__.py
  • #25718: CI: pin cygwin python to 3.9.16-1 and fix typing tests [skip...
  • #25720: MAINT: Bump cibuildwheel to v2.16.4
  • #25748: BLD: unvendor meson-python on 1.26.x and upgrade to meson-python...
  • #25755: MAINT: Include header defining backtrace
  • #25756: BUG: Fix np.quantile([Fraction(2,1)], 0.5) (#24711)

Checksums

MD5

90f33cdd8934cd07192d6ede114d8d4d  numpy-1.26.4-cp310-cp310-macosx_10_9_x86_64.whl
63ac60767f6724490e587f6010bd6839  numpy-1.26.4-cp310-cp310-macosx_11_0_arm64.whl
ad4e82b225aaaf5898ea9798b50978d8  numpy-1.26.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
d428e3da2df4fa359313348302cf003a  numpy-1.26.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
89937c3bb596193f8ca9eae2ff84181e  numpy-1.26.4-cp310-cp310-musllinux_1_1_aarch64.whl
de4f9da0a4e6dfd4cec39c7ad5139803  numpy-1.26.4-cp310-cp310-musllinux_1_1_x86_64.whl
2c1f73fd9b3acf4b9b0c23e985cdd38f  numpy-1.26.4-cp310-cp310-win32.whl
920ad1f50e478b1a877fe7b7a46cc520  numpy-1.26.4-cp310-cp310-win_amd64.whl
719d1ff12db38903dcfd6749078fb11d  numpy-1.26.4-cp311-cp311-macosx_10_9_x86_64.whl
eb601e80194d2e1c00d8daedd8dc68c4  numpy-1.26.4-cp311-cp311-macosx_11_0_arm64.whl
71a7ab11996fa370dc28e28731bd5c32  numpy-1.26.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
eb0cdd03e1ee2eb45c57c7340c98cf48  numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
9d4ae1b0b27a625400f81ed1846a5667  numpy-1.26.4-cp311-cp311-musllinux_1_1_aarch64.whl
1b6771350d2f496157430437a895ba4b  numpy-1.26.4-cp311-cp311-musllinux_1_1_x86_64.whl
1e4a18612ee4d0e54e0833574ebc6d25  numpy-1.26.4-cp311-cp311-win32.whl
5fd325dd8704023c1110835d7a1b095a  numpy-1.26.4-cp311-cp311-win_amd64.whl
d95ce582923d24dbddbc108aa5fd2128  numpy-1.26.4-cp312-cp312-macosx_10_9_x86_64.whl
6f16f3d70e0d95ce2b032167c546cc95  numpy-1.26.4-cp312-cp312-macosx_11_0_arm64.whl
5369536d4c45fbe384147ff23185b48a  numpy-1.26.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
1ceb224096686831ad731e472b65e96a  numpy-1.26.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
cd8d3c00bbc89f9bc07e2df762f9e2ae  numpy-1.26.4-cp312-cp312-musllinux_1_1_aarch64.whl
5bd81ce840bb2e42befe01efb0402b79  numpy-1.26.4-cp312-cp312-musllinux_1_1_x86_64.whl
2cc3b0757228078395da3efa3dc99f23  numpy-1.26.4-cp312-cp312-win32.whl
305155bd5ae879344c58968879584ed1  numpy-1.26.4-cp312-cp312-win_amd64.whl
ec2310f67215743e9c5d16b6c9fb87b6  numpy-1.26.4-cp39-cp39-macosx_10_9_x86_64.whl
406aea6081c1affbebdb6ad56b5deaf4  numpy-1.26.4-cp39-cp39-macosx_11_0_arm64.whl
fee12f0a3cbac7bbf1a1c2d82d3b02a9  numpy-1.26.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
baf4b7143c7b9ce170e62b33380fb573  numpy-1.26.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
376ff29f90b7840ae19ecd59ad1ddf53  numpy-1.26.4-cp39-cp39-musllinux_1_1_aarch64.whl
86785b3a7cd156c08c2ebc26f7816fb3  numpy-1.26.4-cp39-cp39-musllinux_1_1_x86_64.whl
ab8a9ab69f16b7005f238cda76bc0bac  numpy-1.26.4-cp39-cp39-win32.whl
fafa4453e820c7ff40907e5dc79d8199  numpy-1.26.4-cp39-cp39-win_amd64.whl
7f13e2f07bd3e4a439ade0e4d27905c6  numpy-1.26.4-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
928954b41c1cd0e856f1a31d41722661  numpy-1.26.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
57bbd5c0b3848d804c416cbcab4a0ae8  numpy-1.26.4-pp39-pypy39_pp73-win_amd64.whl
19550cbe7bedd96a928da9d4ad69509d  numpy-1.26.4.tar.gz

SHA256

9ff0f4f29c51e2803569d7a51c2304de5554655a60c5d776e35b4a41413830d0  numpy-1.26.4-cp310-cp310-macosx_10_9_x86_64.whl
2e4ee3380d6de9c9ec04745830fd9e2eccb3e6cf790d39d7b98ffd19b0dd754a  numpy-1.26.4-cp310-cp310-macosx_11_0_arm64.whl
d209d8969599b27ad20994c8e41936ee0964e6da07478d6c35016bc386b66ad4  numpy-1.26.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
ffa75af20b44f8dba823498024771d5ac50620e6915abac414251bd971b4529f  numpy-1.26.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
62b8e4b1e28009ef2846b4c7852046736bab361f7aeadeb6a5b89ebec3c7055a  numpy-1.26.4-cp310-cp310-musllinux_1_1_aarch64.whl
a4abb4f9001ad2858e7ac189089c42178fcce737e4169dc61321660f1a96c7d2  numpy-1.26.4-cp310-cp310-musllinux_1_1_x86_64.whl
bfe25acf8b437eb2a8b2d49d443800a5f18508cd811fea3181723922a8a82b07  numpy-1.26.4-cp310-cp310-win32.whl
b97fe8060236edf3662adfc2c633f56a08ae30560c56310562cb4f95500022d5  numpy-1.26.4-cp310-cp310-win_amd64.whl
4c66707fabe114439db9068ee468c26bbdf909cac0fb58686a42a24de1760c71  numpy-1.26.4-cp311-cp311-macosx_10_9_x86_64.whl
edd8b5fe47dab091176d21bb6de568acdd906d1887a4584a15a9a96a1dca06ef  numpy-1.26.4-cp311-cp311-macosx_11_0_arm64.whl
7ab55401287bfec946ced39700c053796e7cc0e3acbef09993a9ad2adba6ca6e  numpy-1.26.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
666dbfb6ec68962c033a450943ded891bed2d54e6755e35e5835d63f4f6931d5  numpy-1.26.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
96ff0b2ad353d8f990b63294c8986f1ec3cb19d749234014f4e7eb0112ceba5a  numpy-1.26.4-cp311-cp311-musllinux_1_1_aarch64.whl
60dedbb91afcbfdc9bc0b1f3f402804070deed7392c23eb7a7f07fa857868e8a  numpy-1.26.4-cp311-cp311-musllinux_1_1_x86_64.whl
1af303d6b2210eb850fcf03064d364652b7120803a0b872f5211f5234b399f20  numpy-1.26.4-cp311-cp311-win32.whl
cd25bcecc4974d09257ffcd1f098ee778f7834c3ad767fe5db785be9a4aa9cb2  numpy-1.26.4-cp311-cp311-win_amd64.whl
b3ce300f3644fb06443ee2222c2201dd3a89ea6040541412b8fa189341847218  numpy-1.26.4-cp312-cp312-macosx_10_9_x86_64.whl
03a8c78d01d9781b28a6989f6fa1bb2c4f2d51201cf99d3dd875df6fbd96b23b  numpy-1.26.4-cp312-cp312-macosx_11_0_arm64.whl
9fad7dcb1aac3c7f0584a5a8133e3a43eeb2fe127f47e3632d43d677c66c102b  numpy-1.26.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
675d61ffbfa78604709862923189bad94014bef562cc35cf61d3a07bba02a7ed  numpy-1.26.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
ab47dbe5cc8210f55aa58e4805fe224dac469cde56b9f731a4c098b91917159a  numpy-1.26.4-cp312-cp312-musllinux_1_1_aarch64.whl
1dda2e7b4ec9dd512f84935c5f126c8bd8b9f2fc001e9f54af255e8c5f16b0e0  numpy-1.26.4-cp312-cp312-musllinux_1_1_x86_64.whl
50193e430acfc1346175fcbdaa28ffec49947a06918b7b92130744e81e640110  numpy-1.26.4-cp312-cp312-win32.whl
08beddf13648eb95f8d867350f6a018a4be2e5ad54c8d8caed89ebca558b2818  numpy-1.26.4-cp312-cp312-win_amd64.whl
7349ab0fa0c429c82442a27a9673fc802ffdb7c7775fad780226cb234965e53c  numpy-1.26.4-cp39-cp39-macosx_10_9_x86_64.whl
52b8b60467cd7dd1e9ed082188b4e6bb35aa5cdd01777621a1658910745b90be  numpy-1.26.4-cp39-cp39-macosx_11_0_arm64.whl
d5241e0a80d808d70546c697135da2c613f30e28251ff8307eb72ba696945764  numpy-1.26.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
f870204a840a60da0b12273ef34f7051e98c3b5961b61b0c2c1be6dfd64fbcd3  numpy-1.26.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
679b0076f67ecc0138fd2ede3a8fd196dddc2ad3254069bcb9faf9a79b1cebcd  numpy-1.26.4-cp39-cp39-musllinux_1_1_aarch64.whl
47711010ad8555514b434df65f7d7b076bb8261df1ca9bb78f53d3b2db02e95c  numpy-1.26.4-cp39-cp39-musllinux_1_1_x86_64.whl
a354325ee03388678242a4d7ebcd08b5c727033fcff3b2f536aea978e15ee9e6  numpy-1.26.4-cp39-cp39-win32.whl
3373d5d70a5fe74a2c1bb6d2cfd9609ecf686d47a2d7b1d37a8f3b6bf6003aea  numpy-1.26.4-cp39-cp39-win_amd64.whl
afedb719a9dcfc7eaf2287b839d8198e06dcd4cb5d276a3df279231138e83d30  numpy-1.26.4-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
95a7476c59002f2f6c590b9b7b998306fba6a5aa646b1e22ddfeaf8f78c3a29c  numpy-1.26.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
7e50d0a0cc3189f9cb0aeb3a6a6af18c16f59f004b866cd2be1c14b36134a4a0  numpy-1.26.4-pp39-pypy39_pp73-win_amd64.whl
2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010  numpy-1.26.4.tar.gz
numpy -

Published by charris 10 months ago

NumPy 1.26.3 Release Notes

NumPy 1.26.3 is a maintenance release that fixes bugs and regressions
discovered after the 1.26.2 release. The most notable changes are the
f2py bug fixes. The Python versions supported by this release are
3.9-3.12.

Compatibility

f2py will no longer accept ambiguous -m and .pyf CLI combinations.
When more than one .pyf file is passed, an error is raised. When both
-m and a .pyf is passed, a warning is emitted and the -m provided
name is ignored.

Improvements

f2py now handles common blocks which have kind specifications from
modules. This further expands the usability of intrinsics like
iso_fortran_env and iso_c_binding.

Contributors

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

  • @DWesl
  • @Illviljan
  • Alexander Grund
  • Andrea Bianchi +
  • Charles Harris
  • Daniel Vanzo
  • Johann Rohwer +
  • Matti Picus
  • Nathan Goldbaum
  • Peter Hawkins
  • Raghuveer Devulapalli
  • Ralf Gommers
  • Rohit Goswami
  • Sayed Adel
  • Sebastian Berg
  • Stefano Rivera +
  • Thomas A Caswell
  • matoro

Pull requests merged

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

  • #25130: MAINT: prepare 1.26.x for further development
  • #25188: TYP: add None to __getitem__ in numpy.array_api
  • #25189: BLD,BUG: quadmath required where available [f2py]
  • #25190: BUG: alpha doesn't use REAL(10)
  • #25191: BUG: Fix FP overflow error in division when the divisor is scalar
  • #25192: MAINT: Pin scipy-openblas version.
  • #25201: BUG: Fix f2py to enable use of string optional inout argument
  • #25202: BUG: Fix -fsanitize=alignment issue in numpy/_core/src/multiarray/arraytypes.c.src
  • #25203: TST: Explicitly pass NumPy path to cython during tests (also...
  • #25204: BUG: fix issues with newaxis and linalg.solve in numpy.array_api
  • #25205: BUG: Disallow shadowed modulenames
  • #25217: BUG: Handle common blocks with kind specifications from modules
  • #25218: BUG: Fix moving compiled executable to root with f2py -c on Windows
  • #25219: BUG: Fix single to half-precision conversion on PPC64/VSX3
  • #25227: TST: f2py: fix issue in test skip condition
  • #25240: Revert "MAINT: Pin scipy-openblas version."
  • #25249: MAINT: do not use long type
  • #25377: TST: PyPy needs another gc.collect on latest versions
  • #25378: CI: Install Lapack runtime on Cygwin.
  • #25379: MAINT: Bump conda-incubator/setup-miniconda from 2.2.0 to 3.0.1
  • #25380: BLD: update vendored Meson for AIX shared library fix
  • #25419: MAINT: Init base in cpu_avx512_kn
  • #25420: BUG: Fix failing test_features on SapphireRapids
  • #25422: BUG: Fix non-contiguous memory load when ARM/Neon is enabled
  • #25428: MAINT,BUG: Never import distutils above 3.12 [f2py]
  • #25452: MAINT: make the import-time check for old Accelerate more specific
  • #25458: BUG: fix macOS version checks for Accelerate support
  • #25465: MAINT: Bump actions/setup-node and larsoner/circleci-artifacts-redirector-action
  • #25466: BUG: avoid seg fault from OOB access in RandomState.set_state()
  • #25467: BUG: Fix two errors related to not checking for failed allocations
  • #25468: BUG: Fix regression with f2py wrappers when modules and subroutines...
  • #25475: BUG: Fix build issues on SPR
  • #25478: BLD: fix uninitialized variable warnings from simd/neon/memory.h
  • #25480: BUG: Handle iso_c_type mappings more consistently
  • #25481: BUG: Fix module name bug in signature files [urgent] [f2py]
  • #25482: BUG: Handle .pyf.src and fix SciPy [urgent]
  • #25483: DOC: f2py rewrite with meson details
  • #25485: BUG: Add external library handling for meson [f2py]
  • #25486: MAINT: Run f2py's meson backend with the same python that ran...
  • #25489: MAINT: Update numpy/f2py/_backends from main.
  • #25490: MAINT: Easy updates of f2py/*.py from main.
  • #25491: MAINT: Update crackfortran.py and f2py2e.py from main

Checksums

MD5

7660db27715df261948e7f0f13634f16  numpy-1.26.3-cp310-cp310-macosx_10_9_x86_64.whl
98d5b98c822de4bed0cf1b0b8f367192  numpy-1.26.3-cp310-cp310-macosx_11_0_arm64.whl
b71cd0710cec5460292a97a02fa349cd  numpy-1.26.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
0f98a05c92598f849b1be2595f4a52a8  numpy-1.26.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
b866c6aea8070c0753b776d2b521e875  numpy-1.26.3-cp310-cp310-musllinux_1_1_aarch64.whl
cfdde5868e469fb27655ea73b0b9593b  numpy-1.26.3-cp310-cp310-musllinux_1_1_x86_64.whl
2655440d61671b5e32b049d30397c58f  numpy-1.26.3-cp310-cp310-win32.whl
7718a5d33344784ca7821f3bdd467550  numpy-1.26.3-cp310-cp310-win_amd64.whl
28e4b2ed9192c392f792d88b3c246d1c  numpy-1.26.3-cp311-cp311-macosx_10_9_x86_64.whl
fb1ae72749463e2c82f0127699728364  numpy-1.26.3-cp311-cp311-macosx_11_0_arm64.whl
304dec822b508a1d495917610e7562bf  numpy-1.26.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
2cc0d8b073dfd55946a60ba8ed4369f6  numpy-1.26.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
c99962375c599501820899c8ccab6960  numpy-1.26.3-cp311-cp311-musllinux_1_1_aarch64.whl
47ed42d067ce4863bbf1f40da61ba7d1  numpy-1.26.3-cp311-cp311-musllinux_1_1_x86_64.whl
3ab3757255feb54ca3793fb9db226586  numpy-1.26.3-cp311-cp311-win32.whl
c33f2a4518bae535645357a08a93be1a  numpy-1.26.3-cp311-cp311-win_amd64.whl
bea43600aaff3a4d9978611ccfa44198  numpy-1.26.3-cp312-cp312-macosx_10_9_x86_64.whl
c678d909ebe737fdabf215d8622ce2a3  numpy-1.26.3-cp312-cp312-macosx_11_0_arm64.whl
9f21f1875c92425cec1060564b3abb1c  numpy-1.26.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
c44a1998965d45ec136078ee09d880f2  numpy-1.26.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
9274f5c51fa4f3c8fac5efa3d78acd63  numpy-1.26.3-cp312-cp312-musllinux_1_1_aarch64.whl
07c9f8f86f45077febc46c87ebc0b644  numpy-1.26.3-cp312-cp312-musllinux_1_1_x86_64.whl
a4857b2f7b6a23bca41178bd344bb28a  numpy-1.26.3-cp312-cp312-win32.whl
495d9534961d7b10f16fec4515a3d72b  numpy-1.26.3-cp312-cp312-win_amd64.whl
6494f2d94fd1f184923a33e634692b5e  numpy-1.26.3-cp39-cp39-macosx_10_9_x86_64.whl
515a7314a0ff6aaba8d53a7a1aaa73ab  numpy-1.26.3-cp39-cp39-macosx_11_0_arm64.whl
c856adc6a6a78773c43e9c738d662ed5  numpy-1.26.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
09848456158a01feff28f88c6106aef1  numpy-1.26.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
adec00ea2bc98580a436f82e188c0e2f  numpy-1.26.3-cp39-cp39-musllinux_1_1_aarch64.whl
718bd35dd0431a6434bb30bf8d91d77d  numpy-1.26.3-cp39-cp39-musllinux_1_1_x86_64.whl
e813aa59cb807efb4a8fee52a6dd41ba  numpy-1.26.3-cp39-cp39-win32.whl
08e1b0973d0ae5976b38563eaec1253f  numpy-1.26.3-cp39-cp39-win_amd64.whl
e8887a14750161709636e9fb87df4f36  numpy-1.26.3-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
0bdb19040525451553fb5758b65caf4c  numpy-1.26.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
b931c14d06cc37d85d63ed1ddd88e875  numpy-1.26.3-pp39-pypy39_pp73-win_amd64.whl
1c915dc6c36dd4c674d9379e9470ff8b  numpy-1.26.3.tar.gz

SHA256

806dd64230dbbfaca8a27faa64e2f414bf1c6622ab78cc4264f7f5f028fee3bf  numpy-1.26.3-cp310-cp310-macosx_10_9_x86_64.whl
02f98011ba4ab17f46f80f7f8f1c291ee7d855fcef0a5a98db80767a468c85cd  numpy-1.26.3-cp310-cp310-macosx_11_0_arm64.whl
6d45b3ec2faed4baca41c76617fcdcfa4f684ff7a151ce6fc78ad3b6e85af0a6  numpy-1.26.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
bdd2b45bf079d9ad90377048e2747a0c82351989a2165821f0c96831b4a2a54b  numpy-1.26.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
211ddd1e94817ed2d175b60b6374120244a4dd2287f4ece45d49228b4d529178  numpy-1.26.3-cp310-cp310-musllinux_1_1_aarch64.whl
b1240f767f69d7c4c8a29adde2310b871153df9b26b5cb2b54a561ac85146485  numpy-1.26.3-cp310-cp310-musllinux_1_1_x86_64.whl
21a9484e75ad018974a2fdaa216524d64ed4212e418e0a551a2d83403b0531d3  numpy-1.26.3-cp310-cp310-win32.whl
9e1591f6ae98bcfac2a4bbf9221c0b92ab49762228f38287f6eeb5f3f55905ce  numpy-1.26.3-cp310-cp310-win_amd64.whl
b831295e5472954104ecb46cd98c08b98b49c69fdb7040483aff799a755a7374  numpy-1.26.3-cp311-cp311-macosx_10_9_x86_64.whl
9e87562b91f68dd8b1c39149d0323b42e0082db7ddb8e934ab4c292094d575d6  numpy-1.26.3-cp311-cp311-macosx_11_0_arm64.whl
8c66d6fec467e8c0f975818c1796d25c53521124b7cfb760114be0abad53a0a2  numpy-1.26.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
f25e2811a9c932e43943a2615e65fc487a0b6b49218899e62e426e7f0a57eeda  numpy-1.26.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
af36e0aa45e25c9f57bf684b1175e59ea05d9a7d3e8e87b7ae1a1da246f2767e  numpy-1.26.3-cp311-cp311-musllinux_1_1_aarch64.whl
51c7f1b344f302067b02e0f5b5d2daa9ed4a721cf49f070280ac202738ea7f00  numpy-1.26.3-cp311-cp311-musllinux_1_1_x86_64.whl
7ca4f24341df071877849eb2034948459ce3a07915c2734f1abb4018d9c49d7b  numpy-1.26.3-cp311-cp311-win32.whl
39763aee6dfdd4878032361b30b2b12593fb445ddb66bbac802e2113eb8a6ac4  numpy-1.26.3-cp311-cp311-win_amd64.whl
a7081fd19a6d573e1a05e600c82a1c421011db7935ed0d5c483e9dd96b99cf13  numpy-1.26.3-cp312-cp312-macosx_10_9_x86_64.whl
12c70ac274b32bc00c7f61b515126c9205323703abb99cd41836e8125ea0043e  numpy-1.26.3-cp312-cp312-macosx_11_0_arm64.whl
7f784e13e598e9594750b2ef6729bcd5a47f6cfe4a12cca13def35e06d8163e3  numpy-1.26.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
5f24750ef94d56ce6e33e4019a8a4d68cfdb1ef661a52cdaee628a56d2437419  numpy-1.26.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
77810ef29e0fb1d289d225cabb9ee6cf4d11978a00bb99f7f8ec2132a84e0166  numpy-1.26.3-cp312-cp312-musllinux_1_1_aarch64.whl
8ed07a90f5450d99dad60d3799f9c03c6566709bd53b497eb9ccad9a55867f36  numpy-1.26.3-cp312-cp312-musllinux_1_1_x86_64.whl
f73497e8c38295aaa4741bdfa4fda1a5aedda5473074369eca10626835445511  numpy-1.26.3-cp312-cp312-win32.whl
da4b0c6c699a0ad73c810736303f7fbae483bcb012e38d7eb06a5e3b432c981b  numpy-1.26.3-cp312-cp312-win_amd64.whl
1666f634cb3c80ccbd77ec97bc17337718f56d6658acf5d3b906ca03e90ce87f  numpy-1.26.3-cp39-cp39-macosx_10_9_x86_64.whl
18c3319a7d39b2c6a9e3bb75aab2304ab79a811ac0168a671a62e6346c29b03f  numpy-1.26.3-cp39-cp39-macosx_11_0_arm64.whl
0b7e807d6888da0db6e7e75838444d62495e2b588b99e90dd80c3459594e857b  numpy-1.26.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
b4d362e17bcb0011738c2d83e0a65ea8ce627057b2fdda37678f4374a382a137  numpy-1.26.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
b8c275f0ae90069496068c714387b4a0eba5d531aace269559ff2b43655edd58  numpy-1.26.3-cp39-cp39-musllinux_1_1_aarch64.whl
cc0743f0302b94f397a4a65a660d4cd24267439eb16493fb3caad2e4389bccbb  numpy-1.26.3-cp39-cp39-musllinux_1_1_x86_64.whl
9bc6d1a7f8cedd519c4b7b1156d98e051b726bf160715b769106661d567b3f03  numpy-1.26.3-cp39-cp39-win32.whl
867e3644e208c8922a3be26fc6bbf112a035f50f0a86497f98f228c50c607bb2  numpy-1.26.3-cp39-cp39-win_amd64.whl
3c67423b3703f8fbd90f5adaa37f85b5794d3366948efe9a5190a5f3a83fc34e  numpy-1.26.3-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
46f47ee566d98849323f01b349d58f2557f02167ee301e5e28809a8c0e27a2d0  numpy-1.26.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
a8474703bffc65ca15853d5fd4d06b18138ae90c17c8d12169968e998e448bb5  numpy-1.26.3-pp39-pypy39_pp73-win_amd64.whl
697df43e2b6310ecc9d95f05d5ef20eacc09c7c4ecc9da3f235d39e71b7da1e4  numpy-1.26.3.tar.gz
numpy - 1.26.2 release

Published by charris 11 months ago

NumPy 1.26.2 Release Notes

NumPy 1.26.2 is a maintenance release that fixes bugs and regressions
discovered after the 1.26.1 release. The 1.26.release series is the last
planned minor release series before NumPy 2.0. The Python versions
supported by this release are 3.9-3.12.

Contributors

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

  • @stefan6419846
  • @thalassemia +
  • Andrew Nelson
  • Charles Bousseau +
  • Charles Harris
  • Marcel Bargull +
  • Mark Mentovai +
  • Matti Picus
  • Nathan Goldbaum
  • Ralf Gommers
  • Sayed Adel
  • Sebastian Berg
  • William Ayd +

Pull requests merged

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

  • #24814: MAINT: align test_dispatcher s390x targets with _umath_tests_mtargets
  • #24929: MAINT: prepare 1.26.x for further development
  • #24955: ENH: Add Cython enumeration for NPY_FR_GENERIC
  • #24962: REL: Remove Python upper version from the release branch
  • #24971: BLD: Use the correct Python interpreter when running tempita.py
  • #24972: MAINT: Remove unhelpful error replacements from import_array()
  • #24977: BLD: use classic linker on macOS, the new one in XCode 15 has...
  • #25003: BLD: musllinux_aarch64 [wheel build]
  • #25043: MAINT: Update mailmap
  • #25049: MAINT: Update meson build infrastructure.
  • #25071: MAINT: Split up .github/workflows to match main
  • #25083: BUG: Backport fix build on ppc64 when the baseline set to Power9...
  • #25093: BLD: Fix features.h detection for Meson builds [1.26.x Backport]
  • #25095: BUG: Avoid intp conversion regression in Cython 3 (backport)
  • #25107: CI: remove obsolete jobs, and move macOS and conda Azure jobs...
  • #25108: CI: Add linux_qemu action and remove travis testing.
  • #25112: MAINT: Update .spin/cmds.py from main.
  • #25113: DOC: Visually divide main license and bundled licenses in wheels
  • #25115: MAINT: Add missing noexcept to shuffle helpers
  • #25116: DOC: Fix license identifier for OpenBLAS
  • #25117: BLD: improve detection of Netlib libblas/libcblas/liblapack
  • #25118: MAINT: Make bitfield integers unsigned
  • #25119: BUG: Make n a long int for np.random.multinomial
  • #25120: BLD: change default of the allow-noblas option to true.
  • #25121: BUG: ensure passing np.dtype to itself doesn't crash

Checksums

MD5

1a5dc6b5b3bf11ad40a59eedb3b69fa1  numpy-1.26.2-cp310-cp310-macosx_10_9_x86_64.whl
4b741c6dfe4e6e22e34e9c5c788d4f04  numpy-1.26.2-cp310-cp310-macosx_11_0_arm64.whl
2953687fb26e1dd8a2d1bb7109551fcd  numpy-1.26.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
ea9127a3a03f27fd101c62425c661d8d  numpy-1.26.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
7a6be7c6c1cc3e1ff73f64052fe30677  numpy-1.26.2-cp310-cp310-musllinux_1_1_aarch64.whl
4f45d3f69f54fd1638609fde34c33a5c  numpy-1.26.2-cp310-cp310-musllinux_1_1_x86_64.whl
f22f5ea26c86eb126ff502fff75d6c21  numpy-1.26.2-cp310-cp310-win32.whl
49871452488e1a55d15ab54c6f3e546e  numpy-1.26.2-cp310-cp310-win_amd64.whl
676740bf60fb1c8f5a6b31e00b9a4e9b  numpy-1.26.2-cp311-cp311-macosx_10_9_x86_64.whl
7170545dcc2a38a1c2386a6081043b64  numpy-1.26.2-cp311-cp311-macosx_11_0_arm64.whl
feae1190c73d811e2e7ebcad4baf6edf  numpy-1.26.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
03131896abade61b77e0f6e53abb988a  numpy-1.26.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
f160632f128a3fd46787aa02d8731fbb  numpy-1.26.2-cp311-cp311-musllinux_1_1_aarch64.whl
014250db593d589b5533ef7127839c46  numpy-1.26.2-cp311-cp311-musllinux_1_1_x86_64.whl
fb437346dac24d0cb23f5314db043c8b  numpy-1.26.2-cp311-cp311-win32.whl
7359adc233874898ea768cd4aec28bb3  numpy-1.26.2-cp311-cp311-win_amd64.whl
207a678bea75227428e7fb84d4dc457a  numpy-1.26.2-cp312-cp312-macosx_10_9_x86_64.whl
302ff6cc047a408cdf21981bd7b26056  numpy-1.26.2-cp312-cp312-macosx_11_0_arm64.whl
7526faaea58c76aed395c7128dd6e14d  numpy-1.26.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
28d3b1943d3a8ad4bbb2ae9da0a77cb9  numpy-1.26.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
d91f5b2bb2c931e41ae7c80ec7509a31  numpy-1.26.2-cp312-cp312-musllinux_1_1_aarch64.whl
b2504d4239419f012c08fa1eab12f940  numpy-1.26.2-cp312-cp312-musllinux_1_1_x86_64.whl
57944ba30adc07f33e83a9b45f5c625a  numpy-1.26.2-cp312-cp312-win32.whl
fe38cd95bbee405ce0cf51c8753a2676  numpy-1.26.2-cp312-cp312-win_amd64.whl
28e1bc3efaf89cf6f0a2b616c0e16401  numpy-1.26.2-cp39-cp39-macosx_10_9_x86_64.whl
9932ccff54855f12ee24f60528279bf1  numpy-1.26.2-cp39-cp39-macosx_11_0_arm64.whl
b52c1e987074dad100ad234122a397b9  numpy-1.26.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
1d1bd7e0d2a89ce795a9566a38ed9bb5  numpy-1.26.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
01d2abfe8e9b35415efb791ac6c5865e  numpy-1.26.2-cp39-cp39-musllinux_1_1_aarch64.whl
5a6d6ac287ebd93a221e59590329e202  numpy-1.26.2-cp39-cp39-musllinux_1_1_x86_64.whl
4e4e4d8cf661a8d2838ee700fabae87e  numpy-1.26.2-cp39-cp39-win32.whl
b8e52ecac110471502686abbdf774b78  numpy-1.26.2-cp39-cp39-win_amd64.whl
aed2d2914be293f60fedda360b64abf8  numpy-1.26.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
6bd88e0f33933445d0e18c1a850f60e0  numpy-1.26.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
010aeb2a50af0af1f7ef56f76f8cf463  numpy-1.26.2-pp39-pypy39_pp73-win_amd64.whl
8f6446a32e47953a03f8fe8533e21e98  numpy-1.26.2.tar.gz

SHA256

3703fc9258a4a122d17043e57b35e5ef1c5a5837c3db8be396c82e04c1cf9b0f  numpy-1.26.2-cp310-cp310-macosx_10_9_x86_64.whl
cc392fdcbd21d4be6ae1bb4475a03ce3b025cd49a9be5345d76d7585aea69440  numpy-1.26.2-cp310-cp310-macosx_11_0_arm64.whl
36340109af8da8805d8851ef1d74761b3b88e81a9bd80b290bbfed61bd2b4f75  numpy-1.26.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
bcc008217145b3d77abd3e4d5ef586e3bdfba8fe17940769f8aa09b99e856c00  numpy-1.26.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
3ced40d4e9e18242f70dd02d739e44698df3dcb010d31f495ff00a31ef6014fe  numpy-1.26.2-cp310-cp310-musllinux_1_1_aarch64.whl
b272d4cecc32c9e19911891446b72e986157e6a1809b7b56518b4f3755267523  numpy-1.26.2-cp310-cp310-musllinux_1_1_x86_64.whl
22f8fc02fdbc829e7a8c578dd8d2e15a9074b630d4da29cda483337e300e3ee9  numpy-1.26.2-cp310-cp310-win32.whl
26c9d33f8e8b846d5a65dd068c14e04018d05533b348d9eaeef6c1bd787f9919  numpy-1.26.2-cp310-cp310-win_amd64.whl
b96e7b9c624ef3ae2ae0e04fa9b460f6b9f17ad8b4bec6d7756510f1f6c0c841  numpy-1.26.2-cp311-cp311-macosx_10_9_x86_64.whl
aa18428111fb9a591d7a9cc1b48150097ba6a7e8299fb56bdf574df650e7d1f1  numpy-1.26.2-cp311-cp311-macosx_11_0_arm64.whl
06fa1ed84aa60ea6ef9f91ba57b5ed963c3729534e6e54055fc151fad0423f0a  numpy-1.26.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
96ca5482c3dbdd051bcd1fce8034603d6ebfc125a7bd59f55b40d8f5d246832b  numpy-1.26.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
854ab91a2906ef29dc3925a064fcd365c7b4da743f84b123002f6139bcb3f8a7  numpy-1.26.2-cp311-cp311-musllinux_1_1_aarch64.whl
f43740ab089277d403aa07567be138fc2a89d4d9892d113b76153e0e412409f8  numpy-1.26.2-cp311-cp311-musllinux_1_1_x86_64.whl
a2bbc29fcb1771cd7b7425f98b05307776a6baf43035d3b80c4b0f29e9545186  numpy-1.26.2-cp311-cp311-win32.whl
2b3fca8a5b00184828d12b073af4d0fc5fdd94b1632c2477526f6bd7842d700d  numpy-1.26.2-cp311-cp311-win_amd64.whl
a4cd6ed4a339c21f1d1b0fdf13426cb3b284555c27ac2f156dfdaaa7e16bfab0  numpy-1.26.2-cp312-cp312-macosx_10_9_x86_64.whl
5d5244aabd6ed7f312268b9247be47343a654ebea52a60f002dc70c769048e75  numpy-1.26.2-cp312-cp312-macosx_11_0_arm64.whl
6a3cdb4d9c70e6b8c0814239ead47da00934666f668426fc6e94cce869e13fd7  numpy-1.26.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
aa317b2325f7aa0a9471663e6093c210cb2ae9c0ad824732b307d2c51983d5b6  numpy-1.26.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
174a8880739c16c925799c018f3f55b8130c1f7c8e75ab0a6fa9d41cab092fd6  numpy-1.26.2-cp312-cp312-musllinux_1_1_aarch64.whl
f79b231bf5c16b1f39c7f4875e1ded36abee1591e98742b05d8a0fb55d8a3eec  numpy-1.26.2-cp312-cp312-musllinux_1_1_x86_64.whl
4a06263321dfd3598cacb252f51e521a8cb4b6df471bb12a7ee5cbab20ea9167  numpy-1.26.2-cp312-cp312-win32.whl
b04f5dc6b3efdaab541f7857351aac359e6ae3c126e2edb376929bd3b7f92d7e  numpy-1.26.2-cp312-cp312-win_amd64.whl
4eb8df4bf8d3d90d091e0146f6c28492b0be84da3e409ebef54349f71ed271ef  numpy-1.26.2-cp39-cp39-macosx_10_9_x86_64.whl
1a13860fdcd95de7cf58bd6f8bc5a5ef81c0b0625eb2c9a783948847abbef2c2  numpy-1.26.2-cp39-cp39-macosx_11_0_arm64.whl
64308ebc366a8ed63fd0bf426b6a9468060962f1a4339ab1074c228fa6ade8e3  numpy-1.26.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
baf8aab04a2c0e859da118f0b38617e5ee65d75b83795055fb66c0d5e9e9b818  numpy-1.26.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
d73a3abcac238250091b11caef9ad12413dab01669511779bc9b29261dd50210  numpy-1.26.2-cp39-cp39-musllinux_1_1_aarch64.whl
b361d369fc7e5e1714cf827b731ca32bff8d411212fccd29ad98ad622449cc36  numpy-1.26.2-cp39-cp39-musllinux_1_1_x86_64.whl
bd3f0091e845164a20bd5a326860c840fe2af79fa12e0469a12768a3ec578d80  numpy-1.26.2-cp39-cp39-win32.whl
2beef57fb031dcc0dc8fa4fe297a742027b954949cabb52a2a376c144e5e6060  numpy-1.26.2-cp39-cp39-win_amd64.whl
1cc3d5029a30fb5f06704ad6b23b35e11309491c999838c31f124fee32107c79  numpy-1.26.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
94cc3c222bb9fb5a12e334d0479b97bb2df446fbe622b470928f5284ffca3f8d  numpy-1.26.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
fe6b44fb8fcdf7eda4ef4461b97b3f63c466b27ab151bec2366db8b197387841  numpy-1.26.2-pp39-pypy39_pp73-win_amd64.whl
f65738447676ab5777f11e6bbbdb8ce11b785e105f690bc45966574816b6d3ea  numpy-1.26.2.tar.gz
numpy -

Published by charris about 1 year ago

NumPy 1.26.1 Release Notes

NumPy 1.26.1 is a maintenance release that fixes bugs and regressions
discovered after the 1.26.0 release. In addition, it adds new
functionality for detecting BLAS and LAPACK when building from source.
Highlights are:

  • Improved detection of BLAS and LAPACK libraries for meson builds
  • Pickle compatibility with the upcoming NumPy 2.0.

The 1.26.release series is the last planned minor release series before
NumPy 2.0. The Python versions supported by this release are 3.9-3.12.

Build system changes

Improved BLAS/LAPACK detection and control

Auto-detection for a number of BLAS and LAPACK is now implemented for
Meson. By default, the build system will try to detect MKL, Accelerate
(on macOS >=13.3), OpenBLAS, FlexiBLAS, BLIS and reference BLAS/LAPACK.
Support for MKL was significantly improved, and support for FlexiBLAS
was added.

New command-line flags are available to further control the selection of
the BLAS and LAPACK libraries to build against.

To select a specific library, use the config-settings interface via
pip or pypa/build. E.g., to select libblas/liblapack, use:

$ pip install numpy -Csetup-args=-Dblas=blas -Csetup-args=-Dlapack=lapack
$ # OR
$ python -m build . -Csetup-args=-Dblas=blas -Csetup-args=-Dlapack=lapack

This works not only for the libraries named above, but for any library
that Meson is able to detect with the given name through pkg-config or
CMake.

Besides -Dblas and -Dlapack, a number of other new flags are
available to control BLAS/LAPACK selection and behavior:

  • -Dblas-order and -Dlapack-order: a list of library names to
    search for in order, overriding the default search order.
  • -Duse-ilp64: if set to true, use ILP64 (64-bit integer) BLAS and
    LAPACK. Note that with this release, ILP64 support has been extended
    to include MKL and FlexiBLAS. OpenBLAS and Accelerate were supported
    in previous releases.
  • -Dallow-noblas: if set to true, allow NumPy to build with its
    internal (very slow) fallback routines instead of linking against an
    external BLAS/LAPACK library. The default for this flag may be
    changed to ``true`` in a future 1.26.x release, however for
    1.26.1 we'd prefer to keep it as ``false`` because if failures
    to detect an installed library are happening, we'd like a bug
    report for that, so we can quickly assess whether the new
    auto-detection machinery needs further improvements.
  • -Dmkl-threading: to select the threading layer for MKL. There are
    four options: seq, iomp, gomp and tbb. The default is
    auto, which selects from those four as appropriate given the
    version of MKL selected.
  • -Dblas-symbol-suffix: manually select the symbol suffix to use for
    the library - should only be needed for linking against libraries
    built in a non-standard way.

New features

numpy._core submodule stubs

numpy._core submodule stubs were added to provide compatibility with
pickled arrays created using NumPy 2.0 when running Numpy 1.26.

Contributors

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

  • Andrew Nelson
  • Anton Prosekin +
  • Charles Harris
  • Chongyun Lee +
  • Ivan A. Melnikov +
  • Jake Lishman +
  • Mahder Gebremedhin +
  • Mateusz Sokół
  • Matti Picus
  • Munira Alduraibi +
  • Ralf Gommers
  • Rohit Goswami
  • Sayed Adel

Pull requests merged

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

  • #24742: MAINT: Update cibuildwheel version
  • #24748: MAINT: fix version string in wheels built with setup.py
  • #24771: BLD, BUG: Fix build failure for host flags e.g. -march=native...
  • #24773: DOC: Updated the f2py docs to remove a note on -fimplicit-none
  • #24776: BUG: Fix SIMD f32 trunc test on s390x when baseline is none
  • #24785: BLD: add libquadmath to licences and other tweaks (#24753)
  • #24786: MAINT: Activate use-compute-credits for Cirrus.
  • #24803: BLD: updated vendored-meson/meson for mips64 fix
  • #24804: MAINT: fix licence path win
  • #24813: BUG: Fix order of Windows OS detection macros.
  • #24831: BUG, SIMD: use scalar cmul on bad Apple clang x86_64 (#24828)
  • #24840: BUG: Fix DATA statements for f2py
  • #24870: API: Add NumpyUnpickler for backporting
  • #24872: MAINT: Xfail test failing on PyPy.
  • #24879: BLD: fix math func feature checks, fix FreeBSD build, add CI...
  • #24899: ENH: meson: implement BLAS/LAPACK auto-detection and many CI...
  • #24902: DOC: add a 1.26.1 release notes section for BLAS/LAPACK build...
  • #24906: MAINT: Backport numpy._core stubs. Remove NumpyUnpickler
  • #24911: MAINT: Bump pypa/cibuildwheel from 2.16.1 to 2.16.2
  • #24912: BUG: loongarch doesn't use REAL(10)

Checksums

MD5

bda38de1a047dd9fdddae16c0d9fb358  numpy-1.26.1-cp310-cp310-macosx_10_9_x86_64.whl
196d2e39047da64ab28e177760c95461  numpy-1.26.1-cp310-cp310-macosx_11_0_arm64.whl
9d25010a7bf50e624d2fed742790afbd  numpy-1.26.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
9b22fa3d030807f0708007d9c0659f65  numpy-1.26.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
eea626b8b930acb4b32302a9e95714f5  numpy-1.26.1-cp310-cp310-musllinux_1_1_x86_64.whl
3c40ef068f50d2ac2913c5b9fa1233fa  numpy-1.26.1-cp310-cp310-win32.whl
315c251d2f284af25761a37ce6dd4d10  numpy-1.26.1-cp310-cp310-win_amd64.whl
ebdd5046937df50e9f54a6d38c5775dd  numpy-1.26.1-cp311-cp311-macosx_10_9_x86_64.whl
682f9beebe8547f205d6cdc8ff96a984  numpy-1.26.1-cp311-cp311-macosx_11_0_arm64.whl
e86da9b6040ea88b3835c4d8f8578658  numpy-1.26.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
ebcb6cf7f64454215e29d8a89829c8e1  numpy-1.26.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
a8c89e13dc9a63712104e2fb06fb63a6  numpy-1.26.1-cp311-cp311-musllinux_1_1_x86_64.whl
339795930404988dbc664ff4cc72b399  numpy-1.26.1-cp311-cp311-win32.whl
4ef5e1bdd7726c19615843f5ac72e618  numpy-1.26.1-cp311-cp311-win_amd64.whl
3aad6bc72db50e9cc88aa5813e8f35bd  numpy-1.26.1-cp312-cp312-macosx_10_9_x86_64.whl
fd62f65ae7798dbda9a3f7af7aa5c8db  numpy-1.26.1-cp312-cp312-macosx_11_0_arm64.whl
104d939e080f1baf0a56aed1de0e79e3  numpy-1.26.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
c44b56c96097f910bbec1420abcf3db5  numpy-1.26.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
1dce230368ae5fc47dd0fe8de8ff771d  numpy-1.26.1-cp312-cp312-musllinux_1_1_x86_64.whl
d93338e7d60e1d294ca326450e99806b  numpy-1.26.1-cp312-cp312-win32.whl
a1832f46521335c1ee4c56dbf12e600b  numpy-1.26.1-cp312-cp312-win_amd64.whl
946fbb0b6caca9258985495532d3f9ab  numpy-1.26.1-cp39-cp39-macosx_10_9_x86_64.whl
78c2ab13d395d67d90bcd6583a6f61a8  numpy-1.26.1-cp39-cp39-macosx_11_0_arm64.whl
0a9d80d8b646abf4ffe51fff3e075d10  numpy-1.26.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
0229ba8145d4f58500873b540a55d60e  numpy-1.26.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
9179fc57c03260374c86e18867c24463  numpy-1.26.1-cp39-cp39-musllinux_1_1_x86_64.whl
246a3103fdbe5d891d7a8aee28875a26  numpy-1.26.1-cp39-cp39-win32.whl
4589dcb7f754fade6ea3946416bee638  numpy-1.26.1-cp39-cp39-win_amd64.whl
3af340d5487a6c045f00fe5eb889957c  numpy-1.26.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
28aece4f1ceb92ec463aa353d4a91c8b  numpy-1.26.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
bbd0461a1e31017b05509e9971b3478e  numpy-1.26.1-pp39-pypy39_pp73-win_amd64.whl
2d770f4c281d405b690c4bcb3dbe99e2  numpy-1.26.1.tar.gz

SHA256

82e871307a6331b5f09efda3c22e03c095d957f04bf6bc1804f30048d0e5e7af  numpy-1.26.1-cp310-cp310-macosx_10_9_x86_64.whl
cdd9ec98f0063d93baeb01aad472a1a0840dee302842a2746a7a8e92968f9575  numpy-1.26.1-cp310-cp310-macosx_11_0_arm64.whl
d78f269e0c4fd365fc2992c00353e4530d274ba68f15e968d8bc3c69ce5f5244  numpy-1.26.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
8ab9163ca8aeb7fd32fe93866490654d2f7dda4e61bc6297bf72ce07fdc02f67  numpy-1.26.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
78ca54b2f9daffa5f323f34cdf21e1d9779a54073f0018a3094ab907938331a2  numpy-1.26.1-cp310-cp310-musllinux_1_1_x86_64.whl
d1cfc92db6af1fd37a7bb58e55c8383b4aa1ba23d012bdbba26b4bcca45ac297  numpy-1.26.1-cp310-cp310-win32.whl
d2984cb6caaf05294b8466966627e80bf6c7afd273279077679cb010acb0e5ab  numpy-1.26.1-cp310-cp310-win_amd64.whl
cd7837b2b734ca72959a1caf3309457a318c934abef7a43a14bb984e574bbb9a  numpy-1.26.1-cp311-cp311-macosx_10_9_x86_64.whl
1c59c046c31a43310ad0199d6299e59f57a289e22f0f36951ced1c9eac3665b9  numpy-1.26.1-cp311-cp311-macosx_11_0_arm64.whl
d58e8c51a7cf43090d124d5073bc29ab2755822181fcad978b12e144e5e5a4b3  numpy-1.26.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
6081aed64714a18c72b168a9276095ef9155dd7888b9e74b5987808f0dd0a974  numpy-1.26.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
97e5d6a9f0702c2863aaabf19f0d1b6c2628fbe476438ce0b5ce06e83085064c  numpy-1.26.1-cp311-cp311-musllinux_1_1_x86_64.whl
b9d45d1dbb9de84894cc50efece5b09939752a2d75aab3a8b0cef6f3a35ecd6b  numpy-1.26.1-cp311-cp311-win32.whl
3649d566e2fc067597125428db15d60eb42a4e0897fc48d28cb75dc2e0454e53  numpy-1.26.1-cp311-cp311-win_amd64.whl
1d1bd82d539607951cac963388534da3b7ea0e18b149a53cf883d8f699178c0f  numpy-1.26.1-cp312-cp312-macosx_10_9_x86_64.whl
afd5ced4e5a96dac6725daeb5242a35494243f2239244fad10a90ce58b071d24  numpy-1.26.1-cp312-cp312-macosx_11_0_arm64.whl
a03fb25610ef560a6201ff06df4f8105292ba56e7cdd196ea350d123fc32e24e  numpy-1.26.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
dcfaf015b79d1f9f9c9fd0731a907407dc3e45769262d657d754c3a028586124  numpy-1.26.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
e509cbc488c735b43b5ffea175235cec24bbc57b227ef1acc691725beb230d1c  numpy-1.26.1-cp312-cp312-musllinux_1_1_x86_64.whl
af22f3d8e228d84d1c0c44c1fbdeb80f97a15a0abe4f080960393a00db733b66  numpy-1.26.1-cp312-cp312-win32.whl
9f42284ebf91bdf32fafac29d29d4c07e5e9d1af862ea73686581773ef9e73a7  numpy-1.26.1-cp312-cp312-win_amd64.whl
bb894accfd16b867d8643fc2ba6c8617c78ba2828051e9a69511644ce86ce83e  numpy-1.26.1-cp39-cp39-macosx_10_9_x86_64.whl
e44ccb93f30c75dfc0c3aa3ce38f33486a75ec9abadabd4e59f114994a9c4617  numpy-1.26.1-cp39-cp39-macosx_11_0_arm64.whl
9696aa2e35cc41e398a6d42d147cf326f8f9d81befcb399bc1ed7ffea339b64e  numpy-1.26.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
a5b411040beead47a228bde3b2241100454a6abde9df139ed087bd73fc0a4908  numpy-1.26.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
1e11668d6f756ca5ef534b5be8653d16c5352cbb210a5c2a79ff288e937010d5  numpy-1.26.1-cp39-cp39-musllinux_1_1_x86_64.whl
d1d2c6b7dd618c41e202c59c1413ef9b2c8e8a15f5039e344af64195459e3104  numpy-1.26.1-cp39-cp39-win32.whl
59227c981d43425ca5e5c01094d59eb14e8772ce6975d4b2fc1e106a833d5ae2  numpy-1.26.1-cp39-cp39-win_amd64.whl
06934e1a22c54636a059215d6da99e23286424f316fddd979f5071093b648668  numpy-1.26.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
76ff661a867d9272cd2a99eed002470f46dbe0943a5ffd140f49be84f68ffc42  numpy-1.26.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
6965888d65d2848e8768824ca8288db0a81263c1efccec881cb35a0d805fcd2f  numpy-1.26.1-pp39-pypy39_pp73-win_amd64.whl
c8c6c72d4a9f831f328efb1312642a1cafafaa88981d9ab76368d50d07d93cbe  numpy-1.26.1.tar.gz
numpy -

Published by charris about 1 year ago

NumPy 1.26.0 Release Notes

The NumPy 1.26.0 release is a continuation of the 1.25.x release cycle
with the addition of Python 3.12.0 support. Python 3.12 dropped
distutils, consequently supporting it required finding a replacement for
the setup.py/distutils based build system NumPy was using. We have
chosen to use the Meson build system instead, and this is the first
NumPy release supporting it. This is also the first release that
supports Cython 3.0 in addition to retaining 0.29.X compatibility.
Supporting those two upgrades was a large project, over 100 files have
been touched in this release. The changelog doesn't capture the full
extent of the work, special thanks to Ralf Gommers, Sayed Adel, Stéfan
van der Walt, and Matti Picus who did much of the work in the main
development branch.

The highlights of this release are:

  • Python 3.12.0 support.
  • Cython 3.0.0 compatibility.
  • Use of the Meson build system
  • Updated SIMD support
  • f2py fixes, meson and bind(x) support
  • Support for the updated Accelerate BLAS/LAPACK library

The Python versions supported in this release are 3.9-3.12.

New Features

Array API v2022.12 support in numpy.array_api

numpy.array_api now full supports the
v2022.12 version of the array API standard. Note that this does not
yet include the optional fft extension in the standard.

(gh-23789)

Support for the updated Accelerate BLAS/LAPACK library

Support for the updated Accelerate BLAS/LAPACK library, including ILP64
(64-bit integer) support, in macOS 13.3 has been added. This brings
arm64 support, and significant performance improvements of up to 10x for
commonly used linear algebra operations. When Accelerate is selected at
build time, the 13.3+ version will automatically be used if available.

(gh-24053)

meson backend for f2py

f2py in compile mode (i.e. f2py -c) now accepts the
--backend meson option. This is the default option for Python 3.12
on-wards. Older versions will still default to --backend distutils.

To support this in realistic use-cases, in compile mode f2py takes a
--dep flag one or many times which maps to dependency() calls in the
meson backend, and does nothing in the distutils backend.

There are no changes for users of f2py only as a code generator, i.e.
without -c.

(gh-24532)

bind(c) support for f2py

Both functions and subroutines can be annotated with bind(c). f2py
will handle both the correct type mapping, and preserve the unique label
for other C interfaces.

Note: bind(c, name = 'routine_name_other_than_fortran_routine') is
not honored by the f2py bindings by design, since bind(c) with the
name is meant to guarantee only the same name in C and Fortran,
not in Python and Fortran.

(gh-24555)

Improvements

iso_c_binding support for f2py

Previously, users would have to define their own custom f2cmap file to
use type mappings defined by the Fortran2003 iso_c_binding intrinsic
module. These type maps are now natively supported by f2py

(gh-24555)

Build system changes

In this release, NumPy has switched to Meson as the build system and
meson-python as the build backend. Installing NumPy or building a wheel
can be done with standard tools like pip and pypa/build. The
following are supported:

  • Regular installs: pip install numpy or (in a cloned repo)
    pip install .
  • Building a wheel: python -m build (preferred), or pip wheel .
  • Editable installs: pip install -e . --no-build-isolation
  • Development builds through the custom CLI implemented with
    spin: spin build.

All the regular pip and pypa/build flags (e.g.,
--no-build-isolation) should work as expected.

NumPy-specific build customization

Many of the NumPy-specific ways of customizing builds have changed. The
NPY_* environment variables which control BLAS/LAPACK, SIMD,
threading, and other such options are no longer supported, nor is a
site.cfg file to select BLAS and LAPACK. Instead, there are
command-line flags that can be passed to the build via pip/build's
config-settings interface. These flags are all listed in the
meson_options.txt file in the root of the repo. Detailed documented
will be available before the final 1.26.0 release; for now please see
the SciPy "building from source" docs
since most build customization works in an almost identical way in SciPy as it
does in NumPy.

Build dependencies

While the runtime dependencies of NumPy have not changed, the build
dependencies have. Because we temporarily vendor Meson and meson-python,
there are several new dependencies - please see the [build-system]
section of pyproject.toml for details.

Troubleshooting

This build system change is quite large. In case of unexpected issues,
it is still possible to use a setup.py-based build as a temporary
workaround (on Python 3.9-3.11, not 3.12), by copying
pyproject.toml.setuppy to pyproject.toml. However, please open an
issue with details on the NumPy issue tracker. We aim to phase out
setup.py builds as soon as possible, and therefore would like to see
all potential blockers surfaced early on in the 1.26.0 release cycle.

Contributors

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

  • @DWesl
  • Albert Steppi +
  • Bas van Beek
  • Charles Harris
  • Developer-Ecosystem-Engineering
  • Filipe Laíns +
  • Jake Vanderplas
  • Liang Yan +
  • Marten van Kerkwijk
  • Matti Picus
  • Melissa Weber Mendonça
  • Namami Shanker
  • Nathan Goldbaum
  • Ralf Gommers
  • Rohit Goswami
  • Sayed Adel
  • Sebastian Berg
  • Stefan van der Walt
  • Tyler Reddy
  • Warren Weckesser

Pull requests merged

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

  • #24305: MAINT: Prepare 1.26.x branch for development
  • #24308: MAINT: Massive update of files from main for numpy 1.26
  • #24322: CI: fix wheel builds on the 1.26.x branch
  • #24326: BLD: update openblas to newer version
  • #24327: TYP: Trim down the _NestedSequence.__getitem__ signature
  • #24328: BUG: fix choose refcount leak
  • #24337: TST: fix running the test suite in builds without BLAS/LAPACK
  • #24338: BUG: random: Fix generation of nan by dirichlet.
  • #24340: MAINT: Dependabot updates from main
  • #24342: MAINT: Add back NPY_RUN_MYPY_IN_TESTSUITE=1
  • #24353: MAINT: Update extbuild.py from main.
  • #24356: TST: fix distutils tests for deprecations in recent setuptools...
  • #24375: MAINT: Update cibuildwheel to version 2.15.0
  • #24381: MAINT: Fix codespaces setup.sh script
  • #24403: ENH: Vendor meson for multi-target build support
  • #24404: BLD: vendor meson-python to make the Windows builds with SIMD...
  • #24405: BLD, SIMD: The meson CPU dispatcher implementation
  • #24406: MAINT: Remove versioneer
  • #24409: REL: Prepare for the NumPy 1.26.0b1 release.
  • #24453: MAINT: Pin upper version of sphinx.
  • #24455: ENH: Add prefix to _ALIGN Macro
  • #24456: BUG: cleanup warnings
  • #24460: MAINT: Upgrade to spin 0.5
  • #24495: BUG: asv dev has been removed, use asv run.
  • #24496: BUG: Fix meson build failure due to unchanged inplace auto-generated...
  • #24521: BUG: fix issue with git-version script, needs a shebang to run
  • #24522: BUG: Use a default assignment for git_hash
  • #24524: BUG: fix NPY_cast_info error handling in choose
  • #24526: BUG: Fix common block handling in f2py
  • #24541: CI,TYP: Bump mypy to 1.4.1
  • #24542: BUG: Fix assumed length f2py regression
  • #24544: MAINT: Harmonize fortranobject
  • #24545: TYP: add kind argument to numpy.isin type specification
  • #24561: BUG: fix comparisons between masked and unmasked structured arrays
  • #24590: CI: Exclude import libraries from list of DLLs on Cygwin.
  • #24591: BLD: fix _umath_linalg dependencies
  • #24594: MAINT: Stop testing on ppc64le.
  • #24602: BLD: meson-cpu: fix SIMD support on platforms with no features
  • #24606: BUG: Change Cython binding directive to "False".
  • #24613: ENH: Adopt new macOS Accelerate BLAS/LAPACK Interfaces, including...
  • #24614: DOC: Update building docs to use Meson
  • #24615: TYP: Add the missing casting keyword to np.clip
  • #24616: TST: convert cython test from setup.py to meson
  • #24617: MAINT: Fixup fromnumeric.pyi
  • #24622: BUG, ENH: Fix iso_c_binding type maps and fix bind(c)...
  • #24629: TYP: Allow binary_repr to accept any object implementing...
  • #24630: TYP: Explicitly declare dtype and generic hashable
  • #24637: ENH: Refactor the typing "reveal" tests using typing.assert_type
  • #24638: MAINT: Bump actions/checkout from 3.6.0 to 4.0.0
  • #24647: ENH: meson backend for f2py
  • #24648: MAINT: Refactor partial load Workaround for Clang
  • #24653: REL: Prepare for the NumPy 1.26.0rc1 release.
  • #24659: BLD: allow specifying the long double format to avoid the runtime...
  • #24665: BLD: fix bug in random.mtrand extension, don't link libnpyrandom
  • #24675: BLD: build wheels for 32-bit Python on Windows, using MSVC
  • #24700: BLD: fix issue with compiler selection during cross compilation
  • #24701: BUG: Fix data stmt handling for complex values in f2py
  • #24707: TYP: Add annotations for the py3.12 buffer protocol
  • #24718: DOC: fix a few doc build issues on 1.26.x and update spin docs...

Checksums

MD5

052d84a2aaad4d5a455b64f5ff3f160b  numpy-1.26.0-cp310-cp310-macosx_10_9_x86_64.whl
874567083be194080e97bea39ea7befd  numpy-1.26.0-cp310-cp310-macosx_11_0_arm64.whl
1a5fa023e05e050b95549d355890fbb6  numpy-1.26.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
2af03fbadd96360b26b993975709d072  numpy-1.26.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
32717dd51a915e9aee4dcca72acb00d0  numpy-1.26.0-cp310-cp310-musllinux_1_1_x86_64.whl
3f101e51b3b5f8c3f01256da645a1962  numpy-1.26.0-cp310-cp310-win32.whl
d523a40f0a5f5ba94f09679adbabf825  numpy-1.26.0-cp310-cp310-win_amd64.whl
6115698fdf5fb8cf895540a57d12bfb9  numpy-1.26.0-cp311-cp311-macosx_10_9_x86_64.whl
207603ee822d8af4542f239b8c0a7a67  numpy-1.26.0-cp311-cp311-macosx_11_0_arm64.whl
0cc5f95c4aebab0ca4f9f66463981016  numpy-1.26.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
a4654b46bc10738825f37a1797e1eba5  numpy-1.26.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
3b037dc746499f2a19bb58b55fdd0bfb  numpy-1.26.0-cp311-cp311-musllinux_1_1_x86_64.whl
7bfb0c44e95f765e7fc5a7a86968a56c  numpy-1.26.0-cp311-cp311-win32.whl
3355b510410cb20bacfb3c87632a731a  numpy-1.26.0-cp311-cp311-win_amd64.whl
9624a97f1df9f64054409d274c1502f3  numpy-1.26.0-cp312-cp312-macosx_10_9_x86_64.whl
53429b1349542c38b2f3822c7f2904d5  numpy-1.26.0-cp312-cp312-macosx_11_0_arm64.whl
66a21bf4d8a6372cc3c4c89a67b96279  numpy-1.26.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
cb9abc312090046563eae619c0b68210  numpy-1.26.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
49e3498e0e0ec5c1f6314fb86d7f006e  numpy-1.26.0-cp312-cp312-musllinux_1_1_x86_64.whl
f4a31765889478341597a7140044db85  numpy-1.26.0-cp312-cp312-win32.whl
e7d7ded11f89baf760e5ba69249606e4  numpy-1.26.0-cp312-cp312-win_amd64.whl
19698f330ae322c4813eed6e790a04d5  numpy-1.26.0-cp39-cp39-macosx_10_9_x86_64.whl
a3628f551d851fbcde6551adb8fcfe2b  numpy-1.26.0-cp39-cp39-macosx_11_0_arm64.whl
b34af2ddf43b28207ec7e2c837cbe35f  numpy-1.26.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
3d888129c86357ccfb779d9f0c1256f5  numpy-1.26.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
e49d00c779df59a786d9f41e0d73c520  numpy-1.26.0-cp39-cp39-musllinux_1_1_x86_64.whl
69f6aa8a0f3919797cb28fab7069a578  numpy-1.26.0-cp39-cp39-win32.whl
8233224840dcdda49b08da1d5e91a730  numpy-1.26.0-cp39-cp39-win_amd64.whl
c11b4d1181b825407b71a1ac8ec04a10  numpy-1.26.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
1515773d4f569d44c6a757cb5a636cb2  numpy-1.26.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
60dc766d863d8ab561b494a7a759d562  numpy-1.26.0-pp39-pypy39_pp73-win_amd64.whl
69bd28f07afbeed2bb6ecd467afcd469  numpy-1.26.0.tar.gz

SHA256

f8db2f125746e44dce707dd44d4f4efeea8d7e2b43aace3f8d1f235cfa2733dd  numpy-1.26.0-cp310-cp310-macosx_10_9_x86_64.whl
0621f7daf973d34d18b4e4bafb210bbaf1ef5e0100b5fa750bd9cde84c7ac292  numpy-1.26.0-cp310-cp310-macosx_11_0_arm64.whl
51be5f8c349fdd1a5568e72713a21f518e7d6707bcf8503b528b88d33b57dc68  numpy-1.26.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
767254ad364991ccfc4d81b8152912e53e103ec192d1bb4ea6b1f5a7117040be  numpy-1.26.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
436c8e9a4bdeeee84e3e59614d38c3dbd3235838a877af8c211cfcac8a80b8d3  numpy-1.26.0-cp310-cp310-musllinux_1_1_x86_64.whl
c2e698cb0c6dda9372ea98a0344245ee65bdc1c9dd939cceed6bb91256837896  numpy-1.26.0-cp310-cp310-win32.whl
09aaee96c2cbdea95de76ecb8a586cb687d281c881f5f17bfc0fb7f5890f6b91  numpy-1.26.0-cp310-cp310-win_amd64.whl
637c58b468a69869258b8ae26f4a4c6ff8abffd4a8334c830ffb63e0feefe99a  numpy-1.26.0-cp311-cp311-macosx_10_9_x86_64.whl
306545e234503a24fe9ae95ebf84d25cba1fdc27db971aa2d9f1ab6bba19a9dd  numpy-1.26.0-cp311-cp311-macosx_11_0_arm64.whl
8c6adc33561bd1d46f81131d5352348350fc23df4d742bb246cdfca606ea1208  numpy-1.26.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
e062aa24638bb5018b7841977c360d2f5917268d125c833a686b7cbabbec496c  numpy-1.26.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
546b7dd7e22f3c6861463bebb000646fa730e55df5ee4a0224408b5694cc6148  numpy-1.26.0-cp311-cp311-musllinux_1_1_x86_64.whl
c0b45c8b65b79337dee5134d038346d30e109e9e2e9d43464a2970e5c0e93229  numpy-1.26.0-cp311-cp311-win32.whl
eae430ecf5794cb7ae7fa3808740b015aa80747e5266153128ef055975a72b99  numpy-1.26.0-cp311-cp311-win_amd64.whl
166b36197e9debc4e384e9c652ba60c0bacc216d0fc89e78f973a9760b503388  numpy-1.26.0-cp312-cp312-macosx_10_9_x86_64.whl
f042f66d0b4ae6d48e70e28d487376204d3cbf43b84c03bac57e28dac6151581  numpy-1.26.0-cp312-cp312-macosx_11_0_arm64.whl
e5e18e5b14a7560d8acf1c596688f4dfd19b4f2945b245a71e5af4ddb7422feb  numpy-1.26.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
7f6bad22a791226d0a5c7c27a80a20e11cfe09ad5ef9084d4d3fc4a299cca505  numpy-1.26.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
4acc65dd65da28060e206c8f27a573455ed724e6179941edb19f97e58161bb69  numpy-1.26.0-cp312-cp312-musllinux_1_1_x86_64.whl
bb0d9a1aaf5f1cb7967320e80690a1d7ff69f1d47ebc5a9bea013e3a21faec95  numpy-1.26.0-cp312-cp312-win32.whl
ee84ca3c58fe48b8ddafdeb1db87388dce2c3c3f701bf447b05e4cfcc3679112  numpy-1.26.0-cp312-cp312-win_amd64.whl
4a873a8180479bc829313e8d9798d5234dfacfc2e8a7ac188418189bb8eafbd2  numpy-1.26.0-cp39-cp39-macosx_10_9_x86_64.whl
914b28d3215e0c721dc75db3ad6d62f51f630cb0c277e6b3bcb39519bed10bd8  numpy-1.26.0-cp39-cp39-macosx_11_0_arm64.whl
c78a22e95182fb2e7874712433eaa610478a3caf86f28c621708d35fa4fd6e7f  numpy-1.26.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
86f737708b366c36b76e953c46ba5827d8c27b7a8c9d0f471810728e5a2fe57c  numpy-1.26.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
b44e6a09afc12952a7d2a58ca0a2429ee0d49a4f89d83a0a11052da696440e49  numpy-1.26.0-cp39-cp39-musllinux_1_1_x86_64.whl
5671338034b820c8d58c81ad1dafc0ed5a00771a82fccc71d6438df00302094b  numpy-1.26.0-cp39-cp39-win32.whl
020cdbee66ed46b671429c7265cf00d8ac91c046901c55684954c3958525dab2  numpy-1.26.0-cp39-cp39-win_amd64.whl
0792824ce2f7ea0c82ed2e4fecc29bb86bee0567a080dacaf2e0a01fe7654369  numpy-1.26.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
7d484292eaeb3e84a51432a94f53578689ffdea3f90e10c8b203a99be5af57d8  numpy-1.26.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
186ba67fad3c60dbe8a3abff3b67a91351100f2661c8e2a80364ae6279720299  numpy-1.26.0-pp39-pypy39_pp73-win_amd64.whl
f93fc78fe8bf15afe2b8d6b6499f1c73953169fad1e9a8dd086cdff3190e7fdf  numpy-1.26.0.tar.gz
numpy -

Published by charris about 1 year ago

NumPy 1.26.0 Release Notes

The NumPy 1.26.0 release is a continuation of the 1.25.x release cycle
with the addition of Python 3.12.0 support. Python 3.12 dropped
distutils, consequently supporting it required finding a replacement for
the setup.py/distutils based build system NumPy was using. We have
chosen to use the Meson build system instead, and this is the first
NumPy release supporting it. This is also the first release that
supports Cython 3.0 in addition to retaining 0.29.X compatibility.
Supporting those two upgrades was a large project, over 100 files have
been touched in this release. The changelog doesn't capture the full
extent of the work, special thanks to Ralf Gommers, Sayed Adel, Stéfan
van der Walt, and Matti Picus who did much of the work in the main
development branch.

The highlights of this release are:

  • Python 3.12.0 support.
  • Cython 3.0.0 compatibility.
  • Use of the Meson build system
  • Updated SIMD support
  • f2py fixes, meson and bind(x) support

The Python versions supported in this release are 3.9-3.12.

New Features

Array API v2022.12 support in numpy.array_api

numpy.array_api now full supports the
v2022.12 version
of the array API standard. Note that this does not yet include the optional
fft extension in the standard.

(gh-23789)

Support for the updated Accelerate BLAS/LAPACK library

Support for the updated Accelerate BLAS/LAPACK library, including ILP64
(64-bit integer) support, in macOS 13.3 has been added. This brings
arm64 support, and significant performance improvements of up to 10x for
commonly used linear algebra operations. When Accelerate is selected at
build time, the 13.3+ version will automatically be used if available.

(gh-24053)

meson backend for f2py

f2py in compile mode (i.e. f2py -c) now accepts the
--backend meson option. This is the default option for Python 3.12
on-wards. Older versions will still default to --backend distutils.

To support this in realistic use-cases, in compile mode f2py takes a
--dep flag one or many times which maps to dependency() calls in the
meson backend, and does nothing in the distutils backend.

There are no changes for users of f2py only as a code generator, i.e.
without -c.

(gh-24532)

bind(c) support for f2py

Both functions and subroutines can be annotated with bind(c). f2py
will handle both the correct type mapping, and preserve the unique label
for other C interfaces.

Note: bind(c, name = 'routine_name_other_than_fortran_routine') is
not honored by the f2py bindings by design, since bind(c) with the
name is meant to guarantee only the same name in C and Fortran,
not in Python and Fortran.

(gh-24555)

Improvements

iso_c_binding support for f2py

Previously, users would have to define their own custom f2cmap file to
use type mappings defined by the Fortran2003 iso_c_binding intrinsic
module. These type maps are now natively supported by f2py

(gh-24555)

Build system changes

In this release, NumPy has switched to Meson as the build system and
meson-python as the build backend. Installing NumPy or building a wheel
can be done with standard tools like pip and pypa/build. The
following are supported:

  • Regular installs: pip install numpy or (in a cloned repo)
    pip install .
  • Building a wheel: python -m build (preferred), or pip wheel .
  • Editable installs: pip install -e . --no-build-isolation
  • Development builds through the custom CLI implemented with
    spin: spin build.

All the regular pip and pypa/build flags (e.g.,
--no-build-isolation) should work as expected.

NumPy-specific build customization

Many of the NumPy-specific ways of customizing builds have changed. The
NPY_* environment variables which control BLAS/LAPACK, SIMD,
threading, and other such options are no longer supported, nor is a
site.cfg file to select BLAS and LAPACK. Instead, there are
command-line flags that can be passed to the build via pip/build's
config-settings interface. These flags are all listed in the
meson_options.txt file in the root of the repo. Detailed documented
will be available before the final 1.26.0 release; for now please see
the SciPy "building from source" docs
since most build customization works in an almost identical way in SciPy as it
does in NumPy.

Build dependencies

While the runtime dependencies of NumPy have not changed, the build
dependencies have. Because we temporarily vendor Meson and meson-python,
there are several new dependencies - please see the [build-system]
section of pyproject.toml for details.

Troubleshooting

This build system change is quite large. In case of unexpected issues,
it is still possible to use a setup.py-based build as a temporary
workaround (on Python 3.9-3.11, not 3.12), by copying
pyproject.toml.setuppy to pyproject.toml. However, please open an
issue with details on the NumPy issue tracker. We aim to phase out
setup.py builds as soon as possible, and therefore would like to see
all potential blockers surfaced early on in the 1.26.0 release cycle.

Contributors

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

  • @DWesl
  • Albert Steppi +
  • Bas van Beek
  • Charles Harris
  • Developer-Ecosystem-Engineering
  • Jake Vanderplas
  • Marten van Kerkwijk
  • Matti Picus
  • Melissa Weber Mendonça
  • Namami Shanker
  • Nathan Goldbaum
  • Ralf Gommers
  • Rohit Goswami
  • Sayed Adel
  • Sebastian Berg
  • Stefan van der Walt
  • Tyler Reddy
  • Warren Weckesser

Pull requests merged

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

  • #24305: MAINT: Prepare 1.26.x branch for development
  • #24308: MAINT: Massive update of files from main for numpy 1.26
  • #24322: CI: fix wheel builds on the 1.26.x branch
  • #24326: BLD: update openblas to newer version
  • #24327: TYP: Trim down the _NestedSequence.__getitem__ signature
  • #24328: BUG: fix choose refcount leak
  • #24337: TST: fix running the test suite in builds without BLAS/LAPACK
  • #24338: BUG: random: Fix generation of nan by dirichlet.
  • #24340: MAINT: Dependabot updates from main
  • #24342: MAINT: Add back NPY_RUN_MYPY_IN_TESTSUITE=1
  • #24353: MAINT: Update extbuild.py from main.
  • #24356: TST: fix distutils tests for deprecations in recent setuptools...
  • #24375: MAINT: Update cibuildwheel to version 2.15.0
  • #24381: MAINT: Fix codespaces setup.sh script
  • #24403: ENH: Vendor meson for multi-target build support
  • #24404: BLD: vendor meson-python to make the Windows builds with SIMD...
  • #24405: BLD, SIMD: The meson CPU dispatcher implementation
  • #24406: MAINT: Remove versioneer
  • #24409: REL: Prepare for the NumPy 1.26.0b1 release.
  • #24453: MAINT: Pin upper version of sphinx.
  • #24455: ENH: Add prefix to _ALIGN Macro
  • #24456: BUG: cleanup warnings [skip azp][skip circle][skip travis][skip...
  • #24460: MAINT: Upgrade to spin 0.5
  • #24495: BUG: asv dev has been removed, use asv run.
  • #24496: BUG: Fix meson build failure due to unchanged inplace auto-generated...
  • #24521: BUG: fix issue with git-version script, needs a shebang to run
  • #24522: BUG: Use a default assignment for git_hash [skip ci]
  • #24524: BUG: fix NPY_cast_info error handling in choose
  • #24526: BUG: Fix common block handling in f2py
  • #24541: CI,TYP: Bump mypy to 1.4.1
  • #24542: BUG: Fix assumed length f2py regression
  • #24544: MAINT: Harmonize fortranobject
  • #24545: TYP: add kind argument to numpy.isin type specification
  • #24561: BUG: fix comparisons between masked and unmasked structured arrays
  • #24590: CI: Exclude import libraries from list of DLLs on Cygwin.
  • #24591: BLD: fix _umath_linalg dependencies
  • #24594: MAINT: Stop testing on ppc64le.
  • #24602: BLD: meson-cpu: fix SIMD support on platforms with no features
  • #24606: BUG: Change Cython binding directive to "False".
  • #24613: ENH: Adopt new macOS Accelerate BLAS/LAPACK Interfaces, including...
  • #24614: DOC: Update building docs to use Meson
  • #24615: TYP: Add the missing casting keyword to np.clip
  • #24616: TST: convert cython test from setup.py to meson
  • #24617: MAINT: Fixup fromnumeric.pyi
  • #24622: BUG, ENH: Fix iso_c_binding type maps and fix bind(c)...
  • #24629: TYP: Allow binary_repr to accept any object implementing...
  • #24630: TYP: Explicitly declare dtype and generic hashable
  • #24637: ENH: Refactor the typing "reveal" tests using [typing.assert_type]{.title-ref}
  • #24638: MAINT: Bump actions/checkout from 3.6.0 to 4.0.0
  • #24647: ENH: meson backend for f2py
  • #24648: MAINT: Refactor partial load Workaround for Clang

Checksums

MD5

9bcab451e9d0eadcc00ca8ce2f5938e7  numpy-1.26.0rc1-cp310-cp310-macosx_10_9_x86_64.whl
4b1c33742eaba91fb2a3fdf531c086f8  numpy-1.26.0rc1-cp310-cp310-macosx_11_0_arm64.whl
6adb6b6a762f256f5ca6c82b6a302912  numpy-1.26.0rc1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
c4dbed88820255134bcae15d02c658ed  numpy-1.26.0rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
72dbf4449513dc1ef51b59266199cf37  numpy-1.26.0rc1-cp310-cp310-musllinux_1_1_x86_64.whl
c25812360af41a904324503d7ca02cce  numpy-1.26.0rc1-cp310-cp310-win_amd64.whl
6bbaeaa8c54a084c749ad4ede57bbeb6  numpy-1.26.0rc1-cp311-cp311-macosx_10_9_x86_64.whl
f0585ce50c22914e0f039fd817a847c4  numpy-1.26.0rc1-cp311-cp311-macosx_11_0_arm64.whl
79e7deab2a43552aa4f4097183e6287d  numpy-1.26.0rc1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
1f94542339a4e6327914398b7785876b  numpy-1.26.0rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
3c3c3ea226bcf0e92796da621c0ac7fe  numpy-1.26.0rc1-cp311-cp311-musllinux_1_1_x86_64.whl
5d6bca28d5c43fc839e4d8eff3b3a35c  numpy-1.26.0rc1-cp311-cp311-win_amd64.whl
94df9fa058c650073de474555cc6f0dc  numpy-1.26.0rc1-cp312-cp312-macosx_10_9_x86_64.whl
2ef744a42b9db31f7ce4a0c7cb8b546d  numpy-1.26.0rc1-cp312-cp312-macosx_11_0_arm64.whl
cf2b61c8480245995348fc2ddc4f556f  numpy-1.26.0rc1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
18cea65bce62f924c34d3b0148db4669  numpy-1.26.0rc1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
5aede55c449bdc62e59230f786faa400  numpy-1.26.0rc1-cp312-cp312-musllinux_1_1_x86_64.whl
15c8199396b8adcfc9a6e4fb730d6faf  numpy-1.26.0rc1-cp312-cp312-win_amd64.whl
c9d97598b2bcaac53dc082106d0bc926  numpy-1.26.0rc1-cp39-cp39-macosx_10_9_x86_64.whl
8359d919806089cf48086c923e1b2e81  numpy-1.26.0rc1-cp39-cp39-macosx_11_0_arm64.whl
4322ecb6dd6db9dc704f54603622da72  numpy-1.26.0rc1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
a275abd27929fa7428c94b6c493798d7  numpy-1.26.0rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
a374c440c6233a78b0bb1bf11776e48f  numpy-1.26.0rc1-cp39-cp39-musllinux_1_1_x86_64.whl
3e540eca6628510c604099a6c0a79fb5  numpy-1.26.0rc1-cp39-cp39-win_amd64.whl
a7b15d45d9b18bd2f065be1eafa3cfea  numpy-1.26.0rc1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
b7e926a0415c30df7010400936922cd7  numpy-1.26.0rc1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
8430d4acc483c66d76b8263ac90195e6  numpy-1.26.0rc1-pp39-pypy39_pp73-win_amd64.whl
23bf7c39807a9cce5c8ea0ba293b7dd9  numpy-1.26.0rc1.tar.gz

SHA256

abe4b4414edd3dc61a2f6df6f0aa7711c654fc59f41a0eeae4c34b9bfc18aa22  numpy-1.26.0rc1-cp310-cp310-macosx_10_9_x86_64.whl
0e294b045e6fa8f071e4c88836b0df2167fc74ff8561138aa5cd69d1ee98b15e  numpy-1.26.0rc1-cp310-cp310-macosx_11_0_arm64.whl
38324eb42bcd45db0b509d02325cb0e3058b6cf05beaf5bd02c221a3133cc9ff  numpy-1.26.0rc1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
302003be9baeb79f07153426544f87f534eb9fe3b8399ac8ee8420f5cfd7ed5c  numpy-1.26.0rc1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
f8a9eb3d3f74978cb155a12a77046dae5b8d76bfcf56f76cc92f0d5976857ef9  numpy-1.26.0rc1-cp310-cp310-musllinux_1_1_x86_64.whl
a9b4723216f7970f571d0d71935b32ffe0eacd011befbaa977f34e928ece8c71  numpy-1.26.0rc1-cp310-cp310-win_amd64.whl
5db29b5d2c73a05ef7ed2a37a1ca8f9391579c402a57f6e0944daf755cf7d437  numpy-1.26.0rc1-cp311-cp311-macosx_10_9_x86_64.whl
180ef984616afd4d746961ac8c874ddd5d547ba8f7dd8a58c30bde398c95d15c  numpy-1.26.0rc1-cp311-cp311-macosx_11_0_arm64.whl
0e3c8d925204ba0aa887244adec030e71003b828d24731f9feb01526aed76458  numpy-1.26.0rc1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
01851e82e3256a6c0088e43e69279a0c96214bafa1be326c7a87390d91eb7d44  numpy-1.26.0rc1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
26571d9f63f49e7612fcfc4375ad23d6882e951bca335115ce440add1a565556  numpy-1.26.0rc1-cp311-cp311-musllinux_1_1_x86_64.whl
f10ef55f19e6634c10b87c5a7c3687461fe950680ebe16e85c03905bcbf6b205  numpy-1.26.0rc1-cp311-cp311-win_amd64.whl
b28cc269bbdd2b6e005241100a97460fdd574ce495fa0eeda3d290d8fd0c66fa  numpy-1.26.0rc1-cp312-cp312-macosx_10_9_x86_64.whl
965fedf11de8b621a20fe7182b95ef9ee76764bc1fc288e5b2cb6e8440372560  numpy-1.26.0rc1-cp312-cp312-macosx_11_0_arm64.whl
2ff5f4f14a772e0f86a250d6db86c4121bc1ce7d788f64053e82638e735bb61b  numpy-1.26.0rc1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
290c9be374026e63c6e5f5099a06c2cdfea33ff2935e7f46fcd9a1b38728c80c  numpy-1.26.0rc1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
d915b8e07e277a443da4525fd36403ca4f14dcb9cd237ab6a9aff73119b71820  numpy-1.26.0rc1-cp312-cp312-musllinux_1_1_x86_64.whl
3042f503964e1e5decacdfd0eeb0ed9eadf9b70ad1a8bb085ee277bd3ddf4362  numpy-1.26.0rc1-cp312-cp312-win_amd64.whl
3080a9ec21470a9b485e92a09baedb5136468d89b2f2a1896a27fa9e36341af2  numpy-1.26.0rc1-cp39-cp39-macosx_10_9_x86_64.whl
dd42d283561d0fe8911ff0576495a09928a3b53de2c5a6d1959e34a393e8ff65  numpy-1.26.0rc1-cp39-cp39-macosx_11_0_arm64.whl
d881436a9b325fa357b7ac32aac0be8c74921ab0f09d47139553e5da23383bc6  numpy-1.26.0rc1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
1c6967bfadb4723aa025a8a9870ff554f1b03c428740167ac6616c7df0c9d817  numpy-1.26.0rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
69580fae06143eb07300d1f1dace92f22dd4d47600e4832bea2b1685d7bc89e9  numpy-1.26.0rc1-cp39-cp39-musllinux_1_1_x86_64.whl
5241d904c9b651183c48b5b7f49e76715d96177def6a7a9bb5aa9e9984000786  numpy-1.26.0rc1-cp39-cp39-win_amd64.whl
6aa0bda5c93d09f8a0253cc902c6dc66de30228c08bd746d4cb4c73d7daee5bc  numpy-1.26.0rc1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
b6e353a18acbbd0253115477879fef4253e284891f37d08eeda6bf77556d1534  numpy-1.26.0rc1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
53a6d1f073f8cad9c97a6e7f16eac552475db8246ce379c961edeafb3d0e3152  numpy-1.26.0rc1-pp39-pypy39_pp73-win_amd64.whl
49a8cafece27db51fd9ec78c044546b15b0c9bf95466c57ada9eeae64075c2f8  numpy-1.26.0rc1.tar.gz
numpy -

Published by charris about 1 year ago

NumPy 1.26.0 Release Notes

The NumPy 1.26.0 release is a continuation of the 1.25.x release cycle
with the addition of Python 3.12.0 support. Python 3.12 dropped
distutils, consequently supporting it required finding a replacement for
the setup.py/distutils based build system NumPy was using. We have
chosen to use the Meson build system instead, and this is the first
NumPy release supporting it. This is also the first release that
supports Cython 3.0 in addition to retaining 0.29.X compatibility.
Supporting those two upgrades was a large project, over 100 files have
been touched in this release. The changelog doesn't capture the full
extent of the work, special thanks to Ralf Gommers, Sayed Adel, Stéfan
van der Walt, and Matti Picus who did much of the work in the main
development branch.

The highlights of this release are:

  • Python 3.12.0 support.
  • Cython 3.0.0 compatibility.
  • Use of the Meson build system
  • Updated SIMD support

The Python versions supported in this release are 3.9-3.12.

Build system changes

In this release, NumPy has switched to Meson as the build system and
meson-python as the build backend. Installing NumPy or building a wheel
can be done with standard tools like pip and pypa/build. The
following are supported:

  • Regular installs: pip install numpy or (in a cloned repo)
    pip install .
  • Building a wheel: python -m build (preferred), or pip wheel .
  • Editable installs: pip install -e . --no-build-isolation
  • Development builds through the custom CLI implemented with
    spin: spin build.

All the regular pip and pypa/build flags (e.g.,
--no-build-isolation) should work as expected.

NumPy-specific build customization

Many of the NumPy-specific ways of customizing builds have changed. The
NPY_* environment variables which control BLAS/LAPACK, SIMD,
threading, and other such options are no longer supported, nor is a
site.cfg file to select BLAS and LAPACK. Instead, there are
command-line flags that can be passed to the build via pip/build's
config-settings interface. These flags are all listed in the
meson_options.txt file in the root of the repo. Detailed documented
will be available before the final 1.26.0 release; for now please see
the SciPy "building from source"docs since most
build customization works in an almost identical way in SciPy as it does
in NumPy.

Build dependencies

While the runtime dependencies of NumPy have not changed, the build
dependencies have. Because we temporarily vendor Meson and meson-python,
there are several new dependencies - please see the [build-system]
section of pyproject.toml for details.

Troubleshooting

This build system change is quite large. In case of unexpected issues,
it is still possible to use a setup.py-based build as a temporary
workaround (on Python 3.9-3.11, not 3.12), by copying
pyproject.toml.setuppy to pyproject.toml. However, please open an
issue with details on the NumPy issue tracker. We aim to phase out
setup.py builds as soon as possible, and therefore would like to see
all potential blockers surfaced early on in the 1.26.0 release cycle.

Contributors

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

  • Bas van Beek
  • Charles Harris
  • Matti Picus
  • Melissa Weber Mendonça
  • Ralf Gommers
  • Sayed Adel
  • Sebastian Berg
  • Stefan van der Walt
  • Tyler Reddy
  • Warren Weckesser

Pull requests merged

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

  • #24305: MAINT: Prepare 1.26.x branch for development
  • #24308: MAINT: Massive update of files from main for numpy 1.26
  • #24322: CI: fix wheel builds on the 1.26.x branch
  • #24326: BLD: update openblas to newer version
  • #24327: TYP: Trim down the _NestedSequence.__getitem__ signature
  • #24328: BUG: fix choose refcount leak
  • #24337: TST: fix running the test suite in builds without BLAS/LAPACK
  • #24338: BUG: random: Fix generation of nan by dirichlet.
  • #24340: MAINT: Dependabot updates from main
  • #24342: MAINT: Add back NPY_RUN_MYPY_IN_TESTSUITE=1
  • #24353: MAINT: Update extbuild.py from main.
  • #24356: TST: fix distutils tests for deprecations in recent setuptools...
  • #24375: MAINT: Update cibuildwheel to version 2.15.0
  • #24381: MAINT: Fix codespaces setup.sh script
  • #24403: ENH: Vendor meson for multi-target build support
  • #24404: BLD: vendor meson-python to make the Windows builds with SIMD...
  • #24405: BLD, SIMD: The meson CPU dispatcher implementation
  • #24406: MAINT: Remove versioneer

Checksums

MD5

875d02016f215f8ce2513453393f0089  numpy-1.26.0b1-cp310-cp310-macosx_10_9_x86_64.whl
7df1856729096fbbbbb82b58c1695810  numpy-1.26.0b1-cp310-cp310-macosx_11_0_arm64.whl
928037510906572ecadb154b8089853f  numpy-1.26.0b1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
93fb7c8a0e7af169c9bf42d8bfa17c2c  numpy-1.26.0b1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
a865069d224bf3830671de8e1f374344  numpy-1.26.0b1-cp310-cp310-musllinux_1_1_x86_64.whl
c53d1d8cb653fc08bd3f931e4c965430  numpy-1.26.0b1-cp310-cp310-win_amd64.whl
c7e212fbb7e64231747c6c8aac0f8678  numpy-1.26.0b1-cp311-cp311-macosx_10_9_x86_64.whl
f2df03cdaee283c1f7486d2f66e497dd  numpy-1.26.0b1-cp311-cp311-macosx_11_0_arm64.whl
8af359b78166474b7a621a482f3073fd  numpy-1.26.0b1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
4eec2761b87ccd43028697410ed8909d  numpy-1.26.0b1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
d9f0b03e455e9e99bdbe69e2e729c197  numpy-1.26.0b1-cp311-cp311-musllinux_1_1_x86_64.whl
dd1c5e4492988e2b3641602b295e7de3  numpy-1.26.0b1-cp311-cp311-win_amd64.whl
88e35ab901c8315ccdb172abc0d2350c  numpy-1.26.0b1-cp312-cp312-macosx_10_9_x86_64.whl
ad426a4203844eaa8de6b519e94dc2c0  numpy-1.26.0b1-cp312-cp312-macosx_11_0_arm64.whl
2e0e7a297de88cfe930c205b1ab8fdb0  numpy-1.26.0b1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
5d4ea12ab53e506a9887ab8a587f68f6  numpy-1.26.0b1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
1b3c3a80d2fb928b753545ded60312f3  numpy-1.26.0b1-cp312-cp312-musllinux_1_1_x86_64.whl
e27356122ee42d84f6965ac802792bc3  numpy-1.26.0b1-cp312-cp312-win_amd64.whl
1cc0d71476548fa30c27a542e3c3f9bf  numpy-1.26.0b1-cp39-cp39-macosx_10_9_x86_64.whl
ec4882af449c1754cc7af84a82305aed  numpy-1.26.0b1-cp39-cp39-macosx_11_0_arm64.whl
142493180019de1ec22c4510bf650366  numpy-1.26.0b1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
4a0c76b75fa36c54c0d2a9107c838910  numpy-1.26.0b1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
cb4d1c3b95e3a2662f94475b4b525da0  numpy-1.26.0b1-cp39-cp39-musllinux_1_1_x86_64.whl
afa3f60467530e022eb1a584a8c48f84  numpy-1.26.0b1-cp39-cp39-win_amd64.whl
35c77e2f2b25225ae62354f91c26a693  numpy-1.26.0b1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
1986181def7286ae37ced5df7c0ca312  numpy-1.26.0b1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
e013942d0d71cb6a680afa89c9aa5259  numpy-1.26.0b1-pp39-pypy39_pp73-win_amd64.whl
3268568cee06327fa34175aa3805829d  numpy-1.26.0b1.tar.gz

SHA256

9a74361204dc604ba53916ed55aef0ca73e7aa3d0b7e47e1c28aece8c2ad4f59  numpy-1.26.0b1-cp310-cp310-macosx_10_9_x86_64.whl
ab9e86bb7c9d3e009945b24a92318ff5d8c245e0e0aaaa765825c4561c292d53  numpy-1.26.0b1-cp310-cp310-macosx_11_0_arm64.whl
b0b73599c80b29dfa7f812cb2e8738ce3f058b413e9f2f478e3cc4e038bb8f8e  numpy-1.26.0b1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
4a6d4c99396c57e02b0181f01ba42b482f327774057e51fb7fb390a130c95cff  numpy-1.26.0b1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
02af7482f34aeb9658ece615c922942f1a3908c449a9a6cd9f33fa233ce486d4  numpy-1.26.0b1-cp310-cp310-musllinux_1_1_x86_64.whl
5a8f04e957259ef93a1e4a29da0b64d49ee842af456257bbb7253925cfe2f7bd  numpy-1.26.0b1-cp310-cp310-win_amd64.whl
f71e10402e705aaa5908464e489d38e6583c48e40a4721f83195772178c7da9f  numpy-1.26.0b1-cp311-cp311-macosx_10_9_x86_64.whl
94d5572fea8dca0fa929da9d17fa49e525ceee1e59b04372dfa5bd8a5f688f5f  numpy-1.26.0b1-cp311-cp311-macosx_11_0_arm64.whl
1f88e6fe42b0d6418e53332e525b299762dbd9e33055d2e0398e6298da5b0cc9  numpy-1.26.0b1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
c466707e5ce5a44caadb85fd672a5ce0bfc060012df465771e7b10506e1e5dad  numpy-1.26.0b1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
16313a28cf703ae722b3ac139809360ffef81a45e758f196e538be3bcbee85c9  numpy-1.26.0b1-cp311-cp311-musllinux_1_1_x86_64.whl
ea85e8e297af49d30830177ecb0c54d1cbca051e4306161f3ceabfa66560b17c  numpy-1.26.0b1-cp311-cp311-win_amd64.whl
321a063fabc302931029f831f284cf43c301fdeead1b15df2f8aa87673294d4d  numpy-1.26.0b1-cp312-cp312-macosx_10_9_x86_64.whl
dc36a9e8df48b72dad668d6f4036ed477d8bc2cb1f7a23b688e8e8057afdfee3  numpy-1.26.0b1-cp312-cp312-macosx_11_0_arm64.whl
3c6c5804671fa1697e3d0cbc608a65c55794fb6682f4e04e9f6d65d0ddfc47c7  numpy-1.26.0b1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
3aa806da215e9c10ba89e9037a69c7a56367e059615679ef1a5cf937eedfbf61  numpy-1.26.0b1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
b66135c02ee55f9113dce3c8c5130b5feaead8767cd2c7ad36547a3d5e264230  numpy-1.26.0b1-cp312-cp312-musllinux_1_1_x86_64.whl
87f2799f475e9e7aee69254dfe357975b163d409550d4641a0bca4cb4f64b725  numpy-1.26.0b1-cp312-cp312-win_amd64.whl
2b258f67ca4a8245c74470da66a87684ddb3f06dde98760efc7ca792a44ee254  numpy-1.26.0b1-cp39-cp39-macosx_10_9_x86_64.whl
a31d9109ffed9fc5566e73346a076fffbc7db00e626579ae4d5dfec933b29bfc  numpy-1.26.0b1-cp39-cp39-macosx_11_0_arm64.whl
18e29ab806ec5e0b05df900d44b3b257a5901c32fc3ddaeb818c520cd9279b4e  numpy-1.26.0b1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
216b47882877ea5272f279c08bf7e42935728f35c6db2e4843b37db7b29ce016  numpy-1.26.0b1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
eea337d6d5ab2b6eb657b3f18e8b57a280f16fb5f94df484d9c1a8d3450d9ae9  numpy-1.26.0b1-cp39-cp39-musllinux_1_1_x86_64.whl
db698c9008217c54a8005ea58bd5836241d7b519c8bb16a698a1b4ec4ca296a8  numpy-1.26.0b1-cp39-cp39-win_amd64.whl
f250b3099649137f1021f8f95a9404273bcb7539f0bef6d6cf2c91260285edc4  numpy-1.26.0b1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
22584a41b1be30543dd8c030affc90d8cb7ec19a56fda7f27fc33f64f8b0fbaa  numpy-1.26.0b1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
8aefe8ab1228e00146e5ae88290c7fdb8221aef45b357aed7f3dff6ac3b3b25a  numpy-1.26.0b1-pp39-pypy39_pp73-win_amd64.whl
c67eea90827e1e9aa220a3fc380ce8776428deba8ac9e7c931ce7b69e8dce115  numpy-1.26.0b1.tar.gz
numpy -

Published by charris about 1 year ago

NumPy 1.25.2 Release Notes

NumPy 1.25.2 is a maintenance release that fixes bugs and regressions
discovered after the 1.25.1 release. This is the last planned release in
the 1.25.x series, the next release will be 1.26.0, which will use the
meson build system and support Python 3.12. The Python versions
supported by this release are 3.9-3.11.

Contributors

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

  • Aaron Meurer
  • Andrew Nelson
  • Charles Harris
  • Kevin Sheppard
  • Matti Picus
  • Nathan Goldbaum
  • Peter Hawkins
  • Ralf Gommers
  • Randy Eckenrode +
  • Sam James +
  • Sebastian Berg
  • Tyler Reddy
  • dependabot[bot]

Pull requests merged

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

  • #24148: MAINT: prepare 1.25.x for further development
  • #24174: ENH: Improve clang-cl compliance
  • #24179: MAINT: Upgrade various build dependencies.
  • #24182: BLD: use -ftrapping-math with Clang on macOS
  • #24183: BUG: properly handle negative indexes in ufunc_at fast path
  • #24184: BUG: PyObject_IsTrue and PyObject_Not error handling in setflags
  • #24185: BUG: histogram small range robust
  • #24186: MAINT: Update meson.build files from main branch
  • #24234: MAINT: exclude min, max and round from np.__all__
  • #24241: MAINT: Dependabot updates
  • #24242: BUG: Fix the signature for np.array_api.take
  • #24243: BLD: update OpenBLAS to an intermeidate commit
  • #24244: BUG: Fix reference count leak in str(scalar).
  • #24245: BUG: fix invalid function pointer conversion error
  • #24255: BUG: Factor out slow getenv call used for memory policy warning
  • #24292: CI: correct URL in cirrus.star
  • #24293: BUG: Fix C types in scalartypes
  • #24294: BUG: do not modify the input to ufunc_at
  • #24295: BUG: Further fixes to indexing loop and added tests

Checksums

MD5

33518ccb4da8ee11f1dee4b9fef1e468  numpy-1.25.2-cp310-cp310-macosx_10_9_x86_64.whl
b5cb0c3b33ef6d93ec2888f25b065636  numpy-1.25.2-cp310-cp310-macosx_11_0_arm64.whl
ae027dd38bd73f09c07220b2f516f148  numpy-1.25.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
88cf69dc3c0d293492c4c7e75dccf3d8  numpy-1.25.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
3e4e3ad02375ba71ae2cd05ccd97aba4  numpy-1.25.2-cp310-cp310-musllinux_1_1_x86_64.whl
f52bb644682deb26c35ddec77198b65c  numpy-1.25.2-cp310-cp310-win32.whl
4944cf36652be7560a6bcd0d5d56e8ea  numpy-1.25.2-cp310-cp310-win_amd64.whl
5a56e639defebb7b871c8c5613960ca3  numpy-1.25.2-cp311-cp311-macosx_10_9_x86_64.whl
3988b96944e7218e629255214f2598bd  numpy-1.25.2-cp311-cp311-macosx_11_0_arm64.whl
302d65015ddd908a862fb3761a2a0363  numpy-1.25.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
e54a2e23272d1c5e5b278bd7e304c948  numpy-1.25.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
961d390e8ccaf11b1b0d6200d2c8b1c0  numpy-1.25.2-cp311-cp311-musllinux_1_1_x86_64.whl
e113865b90f97079d344100c41226fbe  numpy-1.25.2-cp311-cp311-win32.whl
834a147aa1adaec97655018b882232bd  numpy-1.25.2-cp311-cp311-win_amd64.whl
fb55f93a8033bde854c8a2b994045686  numpy-1.25.2-cp39-cp39-macosx_10_9_x86_64.whl
d96e754217d29bf045e082b695667e62  numpy-1.25.2-cp39-cp39-macosx_11_0_arm64.whl
beab540edebecbb257e482dd9e498b44  numpy-1.25.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
e0d608c9e09cd8feba48567586cfefc0  numpy-1.25.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
fe1fc32c8bb005ca04b8f10ebdcff6dd  numpy-1.25.2-cp39-cp39-musllinux_1_1_x86_64.whl
41df58a9935c8ed869c92307c95f02eb  numpy-1.25.2-cp39-cp39-win32.whl
a4371272c64493beb8b04ac46c4c1521  numpy-1.25.2-cp39-cp39-win_amd64.whl
bbe051cbd5f8661dd054277f0b0f0c3d  numpy-1.25.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
3f68e6b4af6922989dc0133e37db34ee  numpy-1.25.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
fc89421b79e8800240999d3a1d06a4d2  numpy-1.25.2-pp39-pypy39_pp73-win_amd64.whl
cee1996a80032d47bdf1d9d17249c34e  numpy-1.25.2.tar.gz

SHA256

db3ccc4e37a6873045580d413fe79b68e47a681af8db2e046f1dacfa11f86eb3  numpy-1.25.2-cp310-cp310-macosx_10_9_x86_64.whl
90319e4f002795ccfc9050110bbbaa16c944b1c37c0baeea43c5fb881693ae1f  numpy-1.25.2-cp310-cp310-macosx_11_0_arm64.whl
dfe4a913e29b418d096e696ddd422d8a5d13ffba4ea91f9f60440a3b759b0187  numpy-1.25.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
f08f2e037bba04e707eebf4bc934f1972a315c883a9e0ebfa8a7756eabf9e357  numpy-1.25.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
bec1e7213c7cb00d67093247f8c4db156fd03075f49876957dca4711306d39c9  numpy-1.25.2-cp310-cp310-musllinux_1_1_x86_64.whl
7dc869c0c75988e1c693d0e2d5b26034644399dd929bc049db55395b1379e044  numpy-1.25.2-cp310-cp310-win32.whl
834b386f2b8210dca38c71a6e0f4fd6922f7d3fcff935dbe3a570945acb1b545  numpy-1.25.2-cp310-cp310-win_amd64.whl
c5462d19336db4560041517dbb7759c21d181a67cb01b36ca109b2ae37d32418  numpy-1.25.2-cp311-cp311-macosx_10_9_x86_64.whl
c5652ea24d33585ea39eb6a6a15dac87a1206a692719ff45d53c5282e66d4a8f  numpy-1.25.2-cp311-cp311-macosx_11_0_arm64.whl
0d60fbae8e0019865fc4784745814cff1c421df5afee233db6d88ab4f14655a2  numpy-1.25.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
60e7f0f7f6d0eee8364b9a6304c2845b9c491ac706048c7e8cf47b83123b8dbf  numpy-1.25.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
bb33d5a1cf360304754913a350edda36d5b8c5331a8237268c48f91253c3a364  numpy-1.25.2-cp311-cp311-musllinux_1_1_x86_64.whl
5883c06bb92f2e6c8181df7b39971a5fb436288db58b5a1c3967702d4278691d  numpy-1.25.2-cp311-cp311-win32.whl
5c97325a0ba6f9d041feb9390924614b60b99209a71a69c876f71052521d42a4  numpy-1.25.2-cp311-cp311-win_amd64.whl
b79e513d7aac42ae918db3ad1341a015488530d0bb2a6abcbdd10a3a829ccfd3  numpy-1.25.2-cp39-cp39-macosx_10_9_x86_64.whl
eb942bfb6f84df5ce05dbf4b46673ffed0d3da59f13635ea9b926af3deb76926  numpy-1.25.2-cp39-cp39-macosx_11_0_arm64.whl
3e0746410e73384e70d286f93abf2520035250aad8c5714240b0492a7302fdca  numpy-1.25.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
d7806500e4f5bdd04095e849265e55de20d8cc4b661b038957354327f6d9b295  numpy-1.25.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
8b77775f4b7df768967a7c8b3567e309f617dd5e99aeb886fa14dc1a0791141f  numpy-1.25.2-cp39-cp39-musllinux_1_1_x86_64.whl
2792d23d62ec51e50ce4d4b7d73de8f67a2fd3ea710dcbc8563a51a03fb07b01  numpy-1.25.2-cp39-cp39-win32.whl
76b4115d42a7dfc5d485d358728cdd8719be33cc5ec6ec08632a5d6fca2ed380  numpy-1.25.2-cp39-cp39-win_amd64.whl
1a1329e26f46230bf77b02cc19e900db9b52f398d6722ca853349a782d4cff55  numpy-1.25.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
4c3abc71e8b6edba80a01a52e66d83c5d14433cbcd26a40c329ec7ed09f37901  numpy-1.25.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
1b9735c27cea5d995496f46a8b1cd7b408b3f34b6d50459d9ac8fe3a20cc17bf  numpy-1.25.2-pp39-pypy39_pp73-win_amd64.whl
fd608e19c8d7c55021dffd43bfe5492fab8cc105cc8986f813f8c3c048b38760  numpy-1.25.2.tar.gz
numpy -

Published by charris over 1 year ago

NumPy 1.25.1 Release Notes

NumPy 1.25.1 is a maintenance release that fixes bugs and regressions
discovered after the 1.25.0 release. The Python versions supported by
this release are 3.9-3.11.

Contributors

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

  • Andrew Nelson
  • Charles Harris
  • Developer-Ecosystem-Engineering
  • Hood Chatham
  • Nathan Goldbaum
  • Rohit Goswami
  • Sebastian Berg
  • Tim Paine +
  • dependabot[bot]
  • matoro +

Pull requests merged

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

  • #23968: MAINT: prepare 1.25.x for further development
  • #24036: BLD: Port long double identification to C for meson
  • #24037: BUG: Fix reduction return NULL to be goto fail
  • #24038: BUG: Avoid undefined behavior in array.astype()
  • #24039: BUG: Ensure __array_ufunc__ works without any kwargs passed
  • #24117: MAINT: Pin urllib3 to avoid anaconda-client bug.
  • #24118: TST: Pin pydantic<2 in Pyodide workflow
  • #24119: MAINT: Bump pypa/cibuildwheel from 2.13.0 to 2.13.1
  • #24120: MAINT: Bump actions/checkout from 3.5.2 to 3.5.3
  • #24122: BUG: Multiply or Divides using SIMD without a full vector can...
  • #24127: MAINT: testing for IS_MUSL closes #24074
  • #24128: BUG: Only replace dtype temporarily if dimensions changed
  • #24129: MAINT: Bump actions/setup-node from 3.6.0 to 3.7.0
  • #24134: BUG: Fix private procedures in f2py modules

Checksums

MD5

d09d98643db31e892fad11b8c2b7af22  numpy-1.25.1-cp310-cp310-macosx_10_9_x86_64.whl
d5b8d3b0424e2af41018f35a087c4500  numpy-1.25.1-cp310-cp310-macosx_11_0_arm64.whl
1007893b1a8bfd97d445a63d29d33642  numpy-1.25.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
6a62d7a6cee310b41dc872aa7f3d7e8b  numpy-1.25.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
e81f6264aecfa2269c5d29d10c362cbc  numpy-1.25.1-cp310-cp310-musllinux_1_1_x86_64.whl
ab8ecd125ca86eac0b3ada67ab66dad6  numpy-1.25.1-cp310-cp310-win32.whl
5466bebeaafcc3d6e1b98858d77ff945  numpy-1.25.1-cp310-cp310-win_amd64.whl
f31b059256ae09b7b83df63f52d8371e  numpy-1.25.1-cp311-cp311-macosx_10_9_x86_64.whl
099f74d654888869704469c321af845d  numpy-1.25.1-cp311-cp311-macosx_11_0_arm64.whl
20d04dccd2bfca5cfd88780d1dc9a3f8  numpy-1.25.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
61dfd7c00638e83a7af59b86615ee9d2  numpy-1.25.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
4eb459c3d9479c4da2fdf20e4c4085d0  numpy-1.25.1-cp311-cp311-musllinux_1_1_x86_64.whl
5e84e797866c68ba65fa89a4bf4ba8ce  numpy-1.25.1-cp311-cp311-win32.whl
87bb1633b2e8029dbfa1e59f7ab22625  numpy-1.25.1-cp311-cp311-win_amd64.whl
3fcf2eb5970d848a26abdff1b10228e7  numpy-1.25.1-cp39-cp39-macosx_10_9_x86_64.whl
d71e1cbe18fe05944219e5a5be1796bf  numpy-1.25.1-cp39-cp39-macosx_11_0_arm64.whl
5b457e10834c991bca84aae7eaa49f34  numpy-1.25.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
5cbb4c2f2892fafdf6f34fcb37c9e743  numpy-1.25.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
7d9d1ae23cf5420652088bfe8e048d89  numpy-1.25.1-cp39-cp39-musllinux_1_1_x86_64.whl
7e5bed491b85f0d7c718d6809f9b3ed2  numpy-1.25.1-cp39-cp39-win32.whl
838e97b751bebadf47e2196b2c88ffa2  numpy-1.25.1-cp39-cp39-win_amd64.whl
9ba95d8d6004d9659d7728fe93f67be9  numpy-1.25.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
fbccb20254a2dc85bdec549a03b8eb56  numpy-1.25.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
95e36689e6dd078caf11e7e2a2d5f5f1  numpy-1.25.1-pp39-pypy39_pp73-win_amd64.whl
768d0ebf15e2242f4c7ca7565bb5dd3e  numpy-1.25.1.tar.gz

SHA256

77d339465dff3eb33c701430bcb9c325b60354698340229e1dff97745e6b3efa  numpy-1.25.1-cp310-cp310-macosx_10_9_x86_64.whl
d736b75c3f2cb96843a5c7f8d8ccc414768d34b0a75f466c05f3a739b406f10b  numpy-1.25.1-cp310-cp310-macosx_11_0_arm64.whl
4a90725800caeaa160732d6b31f3f843ebd45d6b5f3eec9e8cc287e30f2805bf  numpy-1.25.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
6c6c9261d21e617c6dc5eacba35cb68ec36bb72adcff0dee63f8fbc899362588  numpy-1.25.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
0def91f8af6ec4bb94c370e38c575855bf1d0be8a8fbfba42ef9c073faf2cf19  numpy-1.25.1-cp310-cp310-musllinux_1_1_x86_64.whl
fd67b306320dcadea700a8f79b9e671e607f8696e98ec255915c0c6d6b818503  numpy-1.25.1-cp310-cp310-win32.whl
c1516db588987450b85595586605742879e50dcce923e8973f79529651545b57  numpy-1.25.1-cp310-cp310-win_amd64.whl
6b82655dd8efeea69dbf85d00fca40013d7f503212bc5259056244961268b66e  numpy-1.25.1-cp311-cp311-macosx_10_9_x86_64.whl
e8f6049c4878cb16960fbbfb22105e49d13d752d4d8371b55110941fb3b17800  numpy-1.25.1-cp311-cp311-macosx_11_0_arm64.whl
41a56b70e8139884eccb2f733c2f7378af06c82304959e174f8e7370af112e09  numpy-1.25.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
d5154b1a25ec796b1aee12ac1b22f414f94752c5f94832f14d8d6c9ac40bcca6  numpy-1.25.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
38eb6548bb91c421261b4805dc44def9ca1a6eef6444ce35ad1669c0f1a3fc5d  numpy-1.25.1-cp311-cp311-musllinux_1_1_x86_64.whl
791f409064d0a69dd20579345d852c59822c6aa087f23b07b1b4e28ff5880fcb  numpy-1.25.1-cp311-cp311-win32.whl
c40571fe966393b212689aa17e32ed905924120737194b5d5c1b20b9ed0fb171  numpy-1.25.1-cp311-cp311-win_amd64.whl
3d7abcdd85aea3e6cdddb59af2350c7ab1ed764397f8eec97a038ad244d2d105  numpy-1.25.1-cp39-cp39-macosx_10_9_x86_64.whl
1a180429394f81c7933634ae49b37b472d343cccb5bb0c4a575ac8bbc433722f  numpy-1.25.1-cp39-cp39-macosx_11_0_arm64.whl
d412c1697c3853c6fc3cb9751b4915859c7afe6a277c2bf00acf287d56c4e625  numpy-1.25.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
20e1266411120a4f16fad8efa8e0454d21d00b8c7cee5b5ccad7565d95eb42dd  numpy-1.25.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
f76aebc3358ade9eacf9bc2bb8ae589863a4f911611694103af05346637df1b7  numpy-1.25.1-cp39-cp39-musllinux_1_1_x86_64.whl
247d3ffdd7775bdf191f848be8d49100495114c82c2bd134e8d5d075fb386a1c  numpy-1.25.1-cp39-cp39-win32.whl
1d5d3c68e443c90b38fdf8ef40e60e2538a27548b39b12b73132456847f4b631  numpy-1.25.1-cp39-cp39-win_amd64.whl
35a9527c977b924042170a0887de727cd84ff179e478481404c5dc66b4170009  numpy-1.25.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
0d3fe3dd0506a28493d82dc3cf254be8cd0d26f4008a417385cbf1ae95b54004  numpy-1.25.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
012097b5b0d00a11070e8f2e261128c44157a8689f7dedcf35576e525893f4fe  numpy-1.25.1-pp39-pypy39_pp73-win_amd64.whl
9a3a9f3a61480cc086117b426a8bd86869c213fc4072e606f01c4e4b66eb92bf  numpy-1.25.1.tar.gz
numpy -

Published by charris over 1 year ago

NumPy 1.24.4 Release Notes

NumPy 1.24.4 is a maintenance release that fixes a few bugs
discovered after the 1.24.3 release. It is the last planned
release in the 1.24.x cycle. The Python versions supported by
this release are 3.8-3.11.

Contributors

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

  • Bas van Beek
  • Charles Harris
  • Sebastian Berg
  • Hongyang Peng +

Pull requests merged

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

  • #23720: MAINT, BLD: Pin rtools to version 4.0 for Windows builds.
  • #23739: BUG: fix the method for checking local files for 1.24.x
  • #23760: MAINT: Copy rtools installation from install-rtools.
  • #23761: BUG: Fix masked array ravel order for A (and somewhat K)
  • #23890: TYP,DOC: Annotate and document the metadata parameter of...
  • #23994: MAINT: Update rtools installation

Checksums

MD5

25049e3aee79dde29e7a498d3ad13379  numpy-1.24.4-cp310-cp310-macosx_10_9_x86_64.whl
579b5c357c918feaef4af03af8afb721  numpy-1.24.4-cp310-cp310-macosx_11_0_arm64.whl
c873a14fa4f0210884db9c05e2904286  numpy-1.24.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
110a13ac016286059f0658b52b3646c0  numpy-1.24.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
fa67218966c0aef4094867cad7703648  numpy-1.24.4-cp310-cp310-win32.whl
6ee768803d8ebac43ee0a04e628a69f9  numpy-1.24.4-cp310-cp310-win_amd64.whl
0c918c16b58cb7f6773ea7d76e0bdaff  numpy-1.24.4-cp311-cp311-macosx_10_9_x86_64.whl
20506ae8003faf097c6b3a8915b4140e  numpy-1.24.4-cp311-cp311-macosx_11_0_arm64.whl
902df9d5963e89d88a1939d94207857f  numpy-1.24.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
2543611d802c141c8276e4868b4d9619  numpy-1.24.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
37b23a4e4e148d61dd3a515ac5dbf7ec  numpy-1.24.4-cp311-cp311-win32.whl
25e9f6bee2b65ff2a87588e717f15165  numpy-1.24.4-cp311-cp311-win_amd64.whl
f39a0cc3655a482af7d300bcaff5978e  numpy-1.24.4-cp38-cp38-macosx_10_9_x86_64.whl
9ed27941388fdb392e8969169f3fc600  numpy-1.24.4-cp38-cp38-macosx_11_0_arm64.whl
dee3f0c7482f1dc8bd1cd27b9b028a2c  numpy-1.24.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
2cc0967af29df3caef9fb3520f14e071  numpy-1.24.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
8572a3a0973fa78355bcb5f737745b47  numpy-1.24.4-cp38-cp38-win32.whl
771c63f2ef0d31466bbb12362a532265  numpy-1.24.4-cp38-cp38-win_amd64.whl
5713d9dc3dff287fb72121fe1960c48d  numpy-1.24.4-cp39-cp39-macosx_10_9_x86_64.whl
4e6718e3b655219a2a733b4fa242ca32  numpy-1.24.4-cp39-cp39-macosx_11_0_arm64.whl
31487f9a52ef81f8f88ec7fce8738dad  numpy-1.24.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
ea597b30187e55eb16ee31631e66f60d  numpy-1.24.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
98adbf30c67154056474001c125f6188  numpy-1.24.4-cp39-cp39-win32.whl
49c444b0e572ef45f1d92c106a36004e  numpy-1.24.4-cp39-cp39-win_amd64.whl
cdddfdeac437b0f20b4e366f00b5c42e  numpy-1.24.4-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
3778338c15628caa3abd61e6f7bd46ec  numpy-1.24.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
e16bd49d5295dc1b01ed50d76229fb54  numpy-1.24.4-pp38-pypy38_pp73-win_amd64.whl
3f3995540a17854a29dc79f8eeecd832  numpy-1.24.4.tar.gz

SHA256

c0bfb52d2169d58c1cdb8cc1f16989101639b34c7d3ce60ed70b19c63eba0b64  numpy-1.24.4-cp310-cp310-macosx_10_9_x86_64.whl
ed094d4f0c177b1b8e7aa9cba7d6ceed51c0e569a5318ac0ca9a090680a6a1b1  numpy-1.24.4-cp310-cp310-macosx_11_0_arm64.whl
79fc682a374c4a8ed08b331bef9c5f582585d1048fa6d80bc6c35bc384eee9b4  numpy-1.24.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
7ffe43c74893dbf38c2b0a1f5428760a1a9c98285553c89e12d70a96a7f3a4d6  numpy-1.24.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
4c21decb6ea94057331e111a5bed9a79d335658c27ce2adb580fb4d54f2ad9bc  numpy-1.24.4-cp310-cp310-win32.whl
b4bea75e47d9586d31e892a7401f76e909712a0fd510f58f5337bea9572c571e  numpy-1.24.4-cp310-cp310-win_amd64.whl
f136bab9c2cfd8da131132c2cf6cc27331dd6fae65f95f69dcd4ae3c3639c810  numpy-1.24.4-cp311-cp311-macosx_10_9_x86_64.whl
e2926dac25b313635e4d6cf4dc4e51c8c0ebfed60b801c799ffc4c32bf3d1254  numpy-1.24.4-cp311-cp311-macosx_11_0_arm64.whl
222e40d0e2548690405b0b3c7b21d1169117391c2e82c378467ef9ab4c8f0da7  numpy-1.24.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
7215847ce88a85ce39baf9e89070cb860c98fdddacbaa6c0da3ffb31b3350bd5  numpy-1.24.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
4979217d7de511a8d57f4b4b5b2b965f707768440c17cb70fbf254c4b225238d  numpy-1.24.4-cp311-cp311-win32.whl
b7b1fc9864d7d39e28f41d089bfd6353cb5f27ecd9905348c24187a768c79694  numpy-1.24.4-cp311-cp311-win_amd64.whl
1452241c290f3e2a312c137a9999cdbf63f78864d63c79039bda65ee86943f61  numpy-1.24.4-cp38-cp38-macosx_10_9_x86_64.whl
04640dab83f7c6c85abf9cd729c5b65f1ebd0ccf9de90b270cd61935eef0197f  numpy-1.24.4-cp38-cp38-macosx_11_0_arm64.whl
a5425b114831d1e77e4b5d812b69d11d962e104095a5b9c3b641a218abcc050e  numpy-1.24.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
dd80e219fd4c71fc3699fc1dadac5dcf4fd882bfc6f7ec53d30fa197b8ee22dc  numpy-1.24.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
4602244f345453db537be5314d3983dbf5834a9701b7723ec28923e2889e0bb2  numpy-1.24.4-cp38-cp38-win32.whl
692f2e0f55794943c5bfff12b3f56f99af76f902fc47487bdfe97856de51a706  numpy-1.24.4-cp38-cp38-win_amd64.whl
2541312fbf09977f3b3ad449c4e5f4bb55d0dbf79226d7724211acc905049400  numpy-1.24.4-cp39-cp39-macosx_10_9_x86_64.whl
9667575fb6d13c95f1b36aca12c5ee3356bf001b714fc354eb5465ce1609e62f  numpy-1.24.4-cp39-cp39-macosx_11_0_arm64.whl
f3a86ed21e4f87050382c7bc96571755193c4c1392490744ac73d660e8f564a9  numpy-1.24.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
d11efb4dbecbdf22508d55e48d9c8384db795e1b7b51ea735289ff96613ff74d  numpy-1.24.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
6620c0acd41dbcb368610bb2f4d83145674040025e5536954782467100aa8835  numpy-1.24.4-cp39-cp39-win32.whl
befe2bf740fd8373cf56149a5c23a0f601e82869598d41f8e188a0e9869926f8  numpy-1.24.4-cp39-cp39-win_amd64.whl
31f13e25b4e304632a4619d0e0777662c2ffea99fcae2029556b17d8ff958aef  numpy-1.24.4-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
95f7ac6540e95bc440ad77f56e520da5bf877f87dca58bd095288dce8940532a  numpy-1.24.4-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
e98f220aa76ca2a977fe435f5b04d7b3470c0a2e6312907b37ba6068f26787f2  numpy-1.24.4-pp38-pypy38_pp73-win_amd64.whl
80f5e3a4e498641401868df4208b74581206afbee7cf7b8329daae82676d9463  numpy-1.24.4.tar.gz
numpy -

Published by charris over 1 year ago

NumPy 1.25.0 Release Notes

The NumPy 1.25.0 release continues the ongoing work to improve the
handling and promotion of dtypes, increase the execution speed, and
clarify the documentation. There has also been work to prepare for the
future NumPy 2.0.0 release, resulting in a large number of new and
expired deprecation. Highlights are:

  • Support for MUSL, there are now MUSL wheels.
  • Support the Fujitsu C/C++ compiler.
  • Object arrays are now supported in einsum
  • Support for inplace matrix multiplication (@=).

We will be releasing a NumPy 1.26 when Python 3.12 comes out. That is
needed because distutils has been dropped by Python 3.12 and we will be
switching to using meson for future builds. The next mainline release
will be NumPy 2.0.0. We plan that the 2.0 series will still support
downstream projects built against earlier versions of NumPy.

The Python versions supported in this release are 3.9-3.11.

Deprecations

  • np.core.MachAr is deprecated. It is private API. In names defined
    in np.core should generally be considered private.

    (gh-22638)

  • np.finfo(None) is deprecated.

    (gh-23011)

  • np.round_ is deprecated. Use np.round instead.

    (gh-23302)

  • np.product is deprecated. Use np.prod instead.

    (gh-23314)

  • np.cumproduct is deprecated. Use np.cumprod instead.

    (gh-23314)

  • np.sometrue is deprecated. Use np.any instead.

    (gh-23314)

  • np.alltrue is deprecated. Use np.all instead.

    (gh-23314)

  • Only ndim-0 arrays are treated as scalars. NumPy used to treat all
    arrays of size 1 (e.g., np.array([3.14])) as scalars. In the
    future, this will be limited to arrays of ndim 0 (e.g.,
    np.array(3.14)). The following expressions will report a
    deprecation warning:

    a = np.array([3.14])
    float(a)  # better: a[0] to get the numpy.float or a.item()
    
    b = np.array([[3.14]])
    c = numpy.random.rand(10)
    c[0] = b  # better: c[0] = b[0, 0]
    

    (gh-10615)

  • numpy.find_common_type is now deprecated and its use
    should be replaced with either numpy.result_type or
    numpy.promote_types. Most users leave the second
    scalar_types argument to find_common_type as [] in which case
    np.result_type and np.promote_types are both faster and more
    robust. When not using scalar_types the main difference is that
    the replacement intentionally converts non-native byte-order to
    native byte order. Further, find_common_type returns object
    dtype rather than failing promotion. This leads to differences when
    the inputs are not all numeric. Importantly, this also happens for
    e.g. timedelta/datetime for which NumPy promotion rules are
    currently sometimes surprising.

    When the scalar_types argument is not [] things are more
    complicated. In most cases, using np.result_type and passing the
    Python values 0, 0.0, or 0j has the same result as using
    int, float, or complex in scalar_types.

    When scalar_types is constructed, np.result_type is the correct
    replacement and it may be passed scalar values like
    np.float32(0.0). Passing values other than 0, may lead to
    value-inspecting behavior (which np.find_common_type never used
    and NEP 50 may change in the future). The main possible change in
    behavior in this case, is when the array types are signed integers
    and scalar types are unsigned.

    If you are unsure about how to replace a use of scalar_types or
    when non-numeric dtypes are likely, please do not hesitate to open a
    NumPy issue to ask for help.

    (gh-22539)

Expired deprecations

  • np.core.machar and np.finfo.machar have been removed.

    (gh-22638)

  • +arr will now raise an error when the dtype is not numeric (and
    positive is undefined).

    (gh-22998)

  • A sequence must now be passed into the stacking family of functions
    (stack, vstack, hstack, dstack and column_stack).

    (gh-23019)

  • np.clip now defaults to same-kind casting. Falling back to unsafe
    casting was deprecated in NumPy 1.17.

    (gh-23403)

  • np.clip will now propagate np.nan values passed as min or
    max. Previously, a scalar NaN was usually ignored. This was
    deprecated in NumPy 1.17.

    (gh-23403)

  • The np.dual submodule has been removed.

    (gh-23480)

  • NumPy now always ignores sequence behavior for an array-like
    (defining one of the array protocols). (Deprecation started NumPy
    1.20)

    (gh-23660)

  • The niche FutureWarning when casting to a subarray dtype in
    astype or the array creation functions such as asarray is now
    finalized. The behavior is now always the same as if the subarray
    dtype was wrapped into a single field (which was the workaround,
    previously). (FutureWarning since NumPy 1.20)

    (gh-23666)

  • == and != warnings have been finalized. The == and !=
    operators on arrays now always:

    • raise errors that occur during comparisons such as when the
      arrays have incompatible shapes
      (np.array([1, 2]) == np.array([1, 2, 3])).

    • return an array of all True or all False when values are
      fundamentally not comparable (e.g. have different dtypes). An
      example is np.array(["a"]) == np.array([1]).

      This mimics the Python behavior of returning False and True
      when comparing incompatible types like "a" == 1 and
      "a" != 1. For a long time these gave DeprecationWarning or
      FutureWarning.

    (gh-22707)

  • Nose support has been removed. NumPy switched to using pytest in
    2018 and nose has been unmaintained for many years. We have kept
    NumPy's nose support to avoid breaking downstream projects who
    might have been using it and not yet switched to pytest or some
    other testing framework. With the arrival of Python 3.12, unpatched
    nose will raise an error. It is time to move on.

    Decorators removed:

    • raises
    • slow
    • setastest
    • skipif
    • knownfailif
    • deprecated
    • parametrize
    • _needs_refcount

    These are not to be confused with pytest versions with similar
    names, e.g., pytest.mark.slow, pytest.mark.skipif,
    pytest.mark.parametrize.

    Functions removed:

    • Tester
    • import_nose
    • run_module_suite

    (gh-23041)

  • The numpy.testing.utils shim has been removed. Importing from the
    numpy.testing.utils shim has been deprecated since 2019, the shim
    has now been removed. All imports should be made directly from
    numpy.testing.

    (gh-23060)

  • The environment variable to disable dispatching has been removed.
    Support for the NUMPY_EXPERIMENTAL_ARRAY_FUNCTION environment
    variable has been removed. This variable disabled dispatching with
    __array_function__.

    (gh-23376)

  • Support for y= as an alias of out= has been removed. The fix,
    isposinf and isneginf functions allowed using y= as a
    (deprecated) alias for out=. This is no longer supported.

    (gh-23376)

Compatibility notes

  • The busday_count method now correctly handles cases where the
    begindates is later in time than the enddates. Previously, the
    enddates was included, even though the documentation states it is
    always excluded.

    (gh-23229)

  • When comparing datetimes and timedelta using np.equal or
    np.not_equal numpy previously allowed the comparison with
    casting="unsafe". This operation now fails. Forcing the output
    dtype using the dtype kwarg can make the operation succeed, but we
    do not recommend it.

    (gh-22707)

  • When loading data from a file handle using np.load, if the handle
    is at the end of file, as can happen when reading multiple arrays by
    calling np.load repeatedly, numpy previously raised ValueError
    if allow_pickle=False, and OSError if allow_pickle=True. Now
    it raises EOFError instead, in both cases.

    (gh-23105)

np.pad with mode=wrap pads with strict multiples of original data

Code based on earlier version of pad that uses mode="wrap" will
return different results when the padding size is larger than initial
array.

np.pad with mode=wrap now always fills the space with strict
multiples of original data even if the padding size is larger than the
initial array.

(gh-22575)

Cython long_t and ulong_t removed

long_t and ulong_t were aliases for longlong_t and ulonglong_t
and confusing (a remainder from of Python 2). This change may lead to
the errors:

'long_t' is not a type identifier
'ulong_t' is not a type identifier

We recommend use of bit-sized types such as cnp.int64_t or the use of
cnp.intp_t which is 32 bits on 32 bit systems and 64 bits on 64 bit
systems (this is most compatible with indexing). If C long is desired,
use plain long or npy_long. cnp.int_t is also long (NumPy's
default integer). However, long is 32 bit on 64 bit windows and we may
wish to adjust this even in NumPy. (Please do not hesitate to contact
NumPy developers if you are curious about this.)

(gh-22637)

Changed error message and type for bad axes argument to ufunc

The error message and type when a wrong axes value is passed to
ufunc(..., axes=[...]) has changed. The message is now more
indicative of the problem, and if the value is mismatched an
AxisError will be raised. A TypeError will still be raised for
invalidinput types.

(gh-22675)

Array-likes that define __array_ufunc__ can now override ufuncs if used as where

If the where keyword argument of a numpy.ufunc{.interpreted-text
role="class"} is a subclass of numpy.ndarray{.interpreted-text
role="class"} or is a duck type that defines
numpy.class.__array_ufunc__{.interpreted-text role="func"} it can
override the behavior of the ufunc using the same mechanism as the input
and output arguments. Note that for this to work properly, the
where.__array_ufunc__ implementation will have to unwrap the where
argument to pass it into the default implementation of the ufunc or,
for numpy.ndarray{.interpreted-text role="class"} subclasses before
using super().__array_ufunc__.

(gh-23240)

Compiling against the NumPy C API is now backwards compatible by default

NumPy now defaults to exposing a backwards compatible subset of the
C-API. This makes the use of oldest-supported-numpy unnecessary.
Libraries can override the default minimal version to be compatible with
using:

#define NPY_TARGET_VERSION NPY_1_22_API_VERSION

before including NumPy or by passing the equivalent -D option to the
compiler. The NumPy 1.25 default is NPY_1_19_API_VERSION. Because the
NumPy 1.19 C API was identical to the NumPy 1.16 one resulting programs
will be compatible with NumPy 1.16 (from a C-API perspective). This
default will be increased in future non-bugfix releases. You can still
compile against an older NumPy version and run on a newer one.

For more details please see
for-downstream-package-authors{.interpreted-text role="ref"}.

(gh-23528)

New Features

np.einsum now accepts arrays with object dtype

The code path will call python operators on object dtype arrays, much
like np.dot and np.matmul.

(gh-18053)

Add support for inplace matrix multiplication

It is now possible to perform inplace matrix multiplication via the @=
operator.

>>> import numpy as np

>>> a = np.arange(6).reshape(3, 2)
>>> print(a)
[[0 1]
 [2 3]
 [4 5]]

>>> b = np.ones((2, 2), dtype=int)
>>> a @= b
>>> print(a)
[[1 1]
 [5 5]
 [9 9]]

(gh-21120)

Added NPY_ENABLE_CPU_FEATURES environment variable

Users may now choose to enable only a subset of the built CPU features
at runtime by specifying the NPY_ENABLE_CPU_FEATURES
environment variable. Note that these specified features must be outside
the baseline, since those are always assumed. Errors will be raised if
attempting to enable a feature that is either not supported by your CPU,
or that NumPy was not built with.

(gh-22137)

NumPy now has an np.exceptions namespace

NumPy now has a dedicated namespace making most exceptions and warnings
available. All of these remain available in the main namespace, although
some may be moved slowly in the future. The main reason for this is to
increase discoverability and add future exceptions.

(gh-22644)

np.linalg functions return NamedTuples

np.linalg functions that return tuples now return namedtuples. These
functions are eig(), eigh(), qr(), slogdet(), and svd(). The
return type is unchanged in instances where these functions return
non-tuples with certain keyword arguments (like
svd(compute_uv=False)).

(gh-22786)

String functions in np.char are compatible with NEP 42 custom dtypes

Custom dtypes that represent unicode strings or byte strings can now be
passed to the string functions in np.char.

(gh-22863)

String dtype instances can be created from the string abstract dtype classes

It is now possible to create a string dtype instance with a size without
using the string name of the dtype. For example,
type(np.dtype('U'))(8) will create a dtype that is equivalent to
np.dtype('U8'). This feature is most useful when writing generic code
dealing with string dtype classes.

(gh-22963)

Fujitsu C/C++ compiler is now supported

Support for Fujitsu compiler has been added. To build with Fujitsu
compiler, run:

python setup.py build -c fujitsu

SSL2 is now supported

Support for SSL2 has been added. SSL2 is a library that provides
OpenBLAS compatible GEMM functions. To enable SSL2, it need to edit
site.cfg and build with Fujitsu compiler. See site.cfg.example.

(gh-22982)

Improvements

NDArrayOperatorsMixin specifies that it has no __slots__

The NDArrayOperatorsMixin class now specifies that it contains no
__slots__, ensuring that subclasses can now make use of this feature
in Python.

(gh-23113)

Fix power of complex zero

np.power now returns a different result for 0^{non-zero} for complex
numbers. Note that the value is only defined when the real part of the
exponent is larger than zero. Previously, NaN was returned unless the
imaginary part was strictly zero. The return value is either 0+0j or
0-0j.

(gh-18535)

New DTypePromotionError

NumPy now has a new DTypePromotionError which is used when two dtypes
cannot be promoted to a common one, for example:

np.result_type("M8[s]", np.complex128)

raises this new exception.

(gh-22707)

np.show_config uses information from Meson

Build and system information now contains information from Meson.
np.show_config now has a new optional parameter mode to
help customize the output.

(gh-22769)

Fix np.ma.diff not preserving the mask when called with arguments prepend/append.

Calling np.ma.diff with arguments prepend and/or append now returns a
MaskedArray with the input mask preserved.

Previously, a MaskedArray without the mask was returned.

(gh-22776)

Corrected error handling for NumPy C-API in Cython

Many NumPy C functions defined for use in Cython were lacking the
correct error indicator like except -1 or except *. These have now
been added.

(gh-22997)

Ability to directly spawn random number generators

numpy.random.Generator.spawn now allows to directly spawn new independent
child generators via the numpy.random.SeedSequence.spawn mechanism.
numpy.random.BitGenerator.spawn does the same for the underlying bit
generator.

Additionally, numpy.random.BitGenerator.seed_seq now gives
direct access to the seed sequence used for initializing the bit
generator. This allows for example:

seed = 0x2e09b90939db40c400f8f22dae617151
rng = np.random.default_rng(seed)
child_rng1, child_rng2 = rng.spawn(2)

# safely use rng, child_rng1, and child_rng2

Previously, this was hard to do without passing the SeedSequence
explicitly. Please see numpy.random.SeedSequence for more
information.

(gh-23195)

numpy.logspace now supports a non-scalar base argument

The base argument of numpy.logspace can now be array-like if it is
broadcastable against the start and stop arguments.

(gh-23275)

np.ma.dot() now supports for non-2d arrays

Previously np.ma.dot() only worked if a and b were both 2d. Now it
works for non-2d arrays as well as np.dot().

(gh-23322)

Explicitly show keys of .npz file in repr

NpzFile shows keys of loaded .npz file when printed.

>>> npzfile = np.load('arr.npz')
>>> npzfile
NpzFile 'arr.npz' with keys arr_0, arr_1, arr_2, arr_3, arr_4...

(gh-23357)

NumPy now exposes DType classes in np.dtypes

The new numpy.dtypes module now exposes DType classes and will contain
future dtype related functionality. Most users should have no need to
use these classes directly.

(gh-23358)

Drop dtype metadata before saving in .npy or .npz files

Currently, a *.npy file containing a table with a dtype with metadata cannot
be read back. Now, np.save and np.savez drop metadata before saving.

(gh-23371)

numpy.lib.recfunctions.structured_to_unstructured returns views in more cases

structured_to_unstructured now returns a view, if the stride between
the fields is constant. Prior, padding between the fields or a reversed
field would lead to a copy. This change only applies to ndarray,
memmap and recarray. For all other array subclasses, the behavior
remains unchanged.

(gh-23652)

Signed and unsigned integers always compare correctly

When uint64 and int64 are mixed in NumPy, NumPy typically promotes
both to float64. This behavior may be argued about but is confusing
for comparisons ==, <=, since the results returned can be incorrect
but the conversion is hidden since the result is a boolean. NumPy will
now return the correct results for these by avoiding the cast to float.

(gh-23713)

Performance improvements and changes

Faster np.argsort on AVX-512 enabled processors

32-bit and 64-bit quicksort algorithm for np.argsort gain up to 6x speed
up on processors that support AVX-512 instruction set.

Thanks to Intel corporation for sponsoring
this work.

(gh-23707)

Faster np.sort on AVX-512 enabled processors

Quicksort for 16-bit and 64-bit dtypes gain up to 15x and 9x speed up on
processors that support AVX-512 instruction set.

Thanks to Intel corporation for sponsoring
this work.

(gh-22315)

__array_function__ machinery is now much faster

The overhead of the majority of functions in NumPy is now smaller
especially when keyword arguments are used. This change significantly
speeds up many simple function calls.

(gh-23020)

ufunc.at can be much faster

Generic ufunc.at can be up to 9x faster. The conditions for this
speedup:

  • operands are aligned
  • no casting

If ufuncs with appropriate indexed loops on 1d arguments with the above
conditions, ufunc.at can be up to 60x faster (an additional 7x
speedup). Appropriate indexed loops have been added to add,
subtract, multiply, floor_divide, maximum, minimum, fmax,
and fmin.

The internal logic is similar to the logic used for regular ufuncs,
which also have fast paths.

Thanks to the D. E. Shaw group for sponsoring
this work.

(gh-23136)

Faster membership test on NpzFile

Membership test on NpzFile will no longer decompress the archive if it
is successful.

(gh-23661)

Changes

np.r_[] and np.c_[] with certain scalar values

In rare cases, using mainly np.r_ with scalars can lead to different
results. The main potential changes are highlighted by the following:

>>> np.r_[np.arange(5, dtype=np.uint8), -1].dtype
int16  # rather than the default integer (int64 or int32)
>>> np.r_[np.arange(5, dtype=np.int8), 255]
array([  0,   1,   2,   3,   4, 255], dtype=int16)

Where the second example returned:

array([ 0,  1,  2,  3,  4, -1], dtype=int8)

The first one is due to a signed integer scalar with an unsigned integer
array, while the second is due to 255 not fitting into int8 and
NumPy currently inspecting values to make this work. (Note that the
second example is expected to change in the future due to
NEP 50 <NEP50>{.interpreted-text role="ref"}; it will then raise an
error.)

(gh-22539)

Most NumPy functions are wrapped into a C-callable

To speed up the __array_function__ dispatching, most NumPy functions
are now wrapped into C-callables and are not proper Python functions or
C methods. They still look and feel the same as before (like a Python
function), and this should only improve performance and user experience
(cleaner tracebacks). However, please inform the NumPy developers if
this change confuses your program for some reason.

(gh-23020)

C++ standard library usage

NumPy builds now depend on the C++ standard library, because the
numpy.core._multiarray_umath extension is linked with the C++ linker.

(gh-23601)

Checksums

MD5

4657f046d9d9d62e4baeae9b2cc1b4ea  numpy-1.25.0-cp310-cp310-macosx_10_9_x86_64.whl
f57f98fee3da2d98f752f755a880a508  numpy-1.25.0-cp310-cp310-macosx_11_0_arm64.whl
72b0ad52f96a41a7a82f511cb35c7ef1  numpy-1.25.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
a61227341b8903fa66ab0e0fdaa15430  numpy-1.25.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
bfccabfbd866c59545ce11ecdac60701  numpy-1.25.0-cp310-cp310-musllinux_1_1_x86_64.whl
22402904f194376b8d2de01481f04b03  numpy-1.25.0-cp310-cp310-win32.whl
e983b193f7d63568eac85d8bda8be62e  numpy-1.25.0-cp310-cp310-win_amd64.whl
5f6477db172f59a4fd7f591e1007e632  numpy-1.25.0-cp311-cp311-macosx_10_9_x86_64.whl
6a85cca47af69e3d45b4efab9490af4d  numpy-1.25.0-cp311-cp311-macosx_11_0_arm64.whl
ad1c0b4b406c9a2f1b42792502bc456b  numpy-1.25.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
39e241f265611a9c1e89499054ead1c9  numpy-1.25.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
e36b37acf1acfbc185face67c67bfe09  numpy-1.25.0-cp311-cp311-musllinux_1_1_x86_64.whl
67862d7849b4f0f943760142f1628aed  numpy-1.25.0-cp311-cp311-win32.whl
6e8ed7865792246cac2213bad404f4da  numpy-1.25.0-cp311-cp311-win_amd64.whl
25e843425697364f50dd7288ff9d2ce1  numpy-1.25.0-cp39-cp39-macosx_10_9_x86_64.whl
58641e53bcb1e13dfed1f5af1aff94bc  numpy-1.25.0-cp39-cp39-macosx_11_0_arm64.whl
ce15327793c39beecee8401356bc6c9b  numpy-1.25.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
34b734a2c7698d59954c29fe7c0536f3  numpy-1.25.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
6652d9df23c84e54466b10f4a2a290be  numpy-1.25.0-cp39-cp39-musllinux_1_1_x86_64.whl
c228105e3c4c8887823d99e35eea9d2b  numpy-1.25.0-cp39-cp39-win32.whl
1322210ae6a874293d13c4bb3abf24ee  numpy-1.25.0-cp39-cp39-win_amd64.whl
dc36096628e65077c2a44c493606c668  numpy-1.25.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
942b4276f8d563efb111921d5995834c  numpy-1.25.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
0fa0734a8ff952dd643e7b9826168099  numpy-1.25.0-pp39-pypy39_pp73-win_amd64.whl
b236497153bc19b4a560ac485e4c2754  numpy-1.25.0.tar.gz

SHA256

8aa130c3042052d656751df5e81f6d61edff3e289b5994edcf77f54118a8d9f4  numpy-1.25.0-cp310-cp310-macosx_10_9_x86_64.whl
9e3f2b96e3b63c978bc29daaa3700c028fe3f049ea3031b58aa33fe2a5809d24  numpy-1.25.0-cp310-cp310-macosx_11_0_arm64.whl
d6b267f349a99d3908b56645eebf340cb58f01bd1e773b4eea1a905b3f0e4208  numpy-1.25.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
4aedd08f15d3045a4e9c648f1e04daca2ab1044256959f1f95aafeeb3d794c16  numpy-1.25.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
6d183b5c58513f74225c376643234c369468e02947b47942eacbb23c1671f25d  numpy-1.25.0-cp310-cp310-musllinux_1_1_x86_64.whl
d76a84998c51b8b68b40448ddd02bd1081bb33abcdc28beee6cd284fe11036c6  numpy-1.25.0-cp310-cp310-win32.whl
c0dc071017bc00abb7d7201bac06fa80333c6314477b3d10b52b58fa6a6e38f6  numpy-1.25.0-cp310-cp310-win_amd64.whl
4c69fe5f05eea336b7a740e114dec995e2f927003c30702d896892403df6dbf0  numpy-1.25.0-cp311-cp311-macosx_10_9_x86_64.whl
9c7211d7920b97aeca7b3773a6783492b5b93baba39e7c36054f6e749fc7490c  numpy-1.25.0-cp311-cp311-macosx_11_0_arm64.whl
ecc68f11404930e9c7ecfc937aa423e1e50158317bf67ca91736a9864eae0232  numpy-1.25.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
e559c6afbca484072a98a51b6fa466aae785cfe89b69e8b856c3191bc8872a82  numpy-1.25.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
6c284907e37f5e04d2412950960894b143a648dea3f79290757eb878b91acbd1  numpy-1.25.0-cp311-cp311-musllinux_1_1_x86_64.whl
95367ccd88c07af21b379be1725b5322362bb83679d36691f124a16357390153  numpy-1.25.0-cp311-cp311-win32.whl
b76aa836a952059d70a2788a2d98cb2a533ccd46222558b6970348939e55fc24  numpy-1.25.0-cp311-cp311-win_amd64.whl
b792164e539d99d93e4e5e09ae10f8cbe5466de7d759fc155e075237e0c274e4  numpy-1.25.0-cp39-cp39-macosx_10_9_x86_64.whl
7cd981ccc0afe49b9883f14761bb57c964df71124dcd155b0cba2b591f0d64b9  numpy-1.25.0-cp39-cp39-macosx_11_0_arm64.whl
5aa48bebfb41f93043a796128854b84407d4df730d3fb6e5dc36402f5cd594c0  numpy-1.25.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
5177310ac2e63d6603f659fadc1e7bab33dd5a8db4e0596df34214eeab0fee3b  numpy-1.25.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
0ac6edfb35d2a99aaf102b509c8e9319c499ebd4978df4971b94419a116d0790  numpy-1.25.0-cp39-cp39-musllinux_1_1_x86_64.whl
7412125b4f18aeddca2ecd7219ea2d2708f697943e6f624be41aa5f8a9852cc4  numpy-1.25.0-cp39-cp39-win32.whl
26815c6c8498dc49d81faa76d61078c4f9f0859ce7817919021b9eba72b425e3  numpy-1.25.0-cp39-cp39-win_amd64.whl
5b1b90860bf7d8a8c313b372d4f27343a54f415b20fb69dd601b7efe1029c91e  numpy-1.25.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
85cdae87d8c136fd4da4dad1e48064d700f63e923d5af6c8c782ac0df8044542  numpy-1.25.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
cc3fda2b36482891db1060f00f881c77f9423eead4c3579629940a3e12095fe8  numpy-1.25.0-pp39-pypy39_pp73-win_amd64.whl
f1accae9a28dc3cda46a91de86acf69de0d1b5f4edd44a9b0c3ceb8036dfff19  numpy-1.25.0.tar.gz
numpy -

Published by charris over 1 year ago

NumPy 1.24.3 Release Notes

NumPy 1.24.3 is a maintenance release that fixes bugs and regressions
discovered after the 1.24.2 release. The Python versions supported by
this release are 3.8-3.11.

Contributors

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

  • Aleksei Nikiforov +
  • Alexander Heger
  • Bas van Beek
  • Bob Eldering
  • Brock Mendel
  • Charles Harris
  • Kyle Sunden
  • Peter Hawkins
  • Rohit Goswami
  • Sebastian Berg
  • Warren Weckesser
  • dependabot[bot]

Pull requests merged

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

  • #23206: BUG: fix for f2py string scalars (#23194)
  • #23207: BUG: datetime64/timedelta64 comparisons return NotImplemented
  • #23208: MAINT: Pin matplotlib to version 3.6.3 for refguide checks
  • #23221: DOC: Fix matplotlib error in documentation
  • #23226: CI: Ensure submodules are initialized in gitpod.
  • #23341: TYP: Replace duplicate reduce in ufunc type signature with reduceat.
  • #23342: TYP: Remove duplicate CLIP/WRAP/RAISE in __init__.pyi.
  • #23343: TYP: Mark d argument to fftfreq and rfftfreq as optional...
  • #23344: TYP: Add type annotations for comparison operators to MaskedArray.
  • #23345: TYP: Remove some stray type-check-only imports of msort
  • #23370: BUG: Ensure like is only stripped for like= dispatched functions
  • #23543: BUG: fix loading and storing big arrays on s390x
  • #23544: MAINT: Bump larsoner/circleci-artifacts-redirector-action
  • #23634: BUG: Ignore invalid and overflow warnings in masked setitem
  • #23635: BUG: Fix masked array raveling when order="A" or order="K"
  • #23636: MAINT: Update conftest for newer hypothesis versions
  • #23637: BUG: Fix bug in parsing F77 style string arrays.

Checksums

MD5

93a3ce07e3773842c54d831f18e3eb8d  numpy-1.24.3-cp310-cp310-macosx_10_9_x86_64.whl
39691ff3d1612438dfcd3266c9765aab  numpy-1.24.3-cp310-cp310-macosx_11_0_arm64.whl
a99234799a239e7e9c6fa15c212996df  numpy-1.24.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
3673aa638746851dd19d5199e1eb3a91  numpy-1.24.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
3c72962360bcd0938a6bddee6cdca766  numpy-1.24.3-cp310-cp310-win32.whl
a3329efa646012fa4ee06ce5e08eadaf  numpy-1.24.3-cp310-cp310-win_amd64.whl
5323fb0323d1ec10ee3c35a2fa79cbcd  numpy-1.24.3-cp311-cp311-macosx_10_9_x86_64.whl
cfa001dcd07cdf6414ced433e88959d4  numpy-1.24.3-cp311-cp311-macosx_11_0_arm64.whl
d75bbfb06ed00d04232dce0e865eb42c  numpy-1.24.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
fe18b810bcf284572467ce585dbc533b  numpy-1.24.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
e97699a4ef96a81e0916bdf15440abe0  numpy-1.24.3-cp311-cp311-win32.whl
e6de5b7d77dc43ed47f516eb10bbe8b6  numpy-1.24.3-cp311-cp311-win_amd64.whl
dd04ebf441a8913f4900b56e7a33a75e  numpy-1.24.3-cp38-cp38-macosx_10_9_x86_64.whl
e47ac5521b0bfc3effb040072d8a7902  numpy-1.24.3-cp38-cp38-macosx_11_0_arm64.whl
7b7dae3309e7ca8a8859633a5d337431  numpy-1.24.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
8cc87b88163ed84e70c48fd0f5f8f20e  numpy-1.24.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
350934bae971d0ebe231a59b640069db  numpy-1.24.3-cp38-cp38-win32.whl
c4708ef009bb5d427ea94a4fc4a10e12  numpy-1.24.3-cp38-cp38-win_amd64.whl
44b08a293a4e12d62c27b8f15ba5664e  numpy-1.24.3-cp39-cp39-macosx_10_9_x86_64.whl
3ae7ac30f86c720e42b2324a0ae1adf5  numpy-1.24.3-cp39-cp39-macosx_11_0_arm64.whl
065464a8d918c670c7863d1e72e3e6dd  numpy-1.24.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
1f163b9ea417c253e84480aa8d99dee6  numpy-1.24.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
c86e648389e333e062bea11c749b9a32  numpy-1.24.3-cp39-cp39-win32.whl
bfe332e577c604d6d62a57381e6aa0a6  numpy-1.24.3-cp39-cp39-win_amd64.whl
374695eeef5aca32a5b7f2f518dd3ba1  numpy-1.24.3-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
6abd9dba54405182e6e7bb32dbe377bb  numpy-1.24.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
0848bd41c08dd5ebbc5a7f0788678e0e  numpy-1.24.3-pp38-pypy38_pp73-win_amd64.whl
89e5e2e78407032290ae6acf6dcaea46  numpy-1.24.3.tar.gz

SHA256

3c1104d3c036fb81ab923f507536daedc718d0ad5a8707c6061cdfd6d184e570  numpy-1.24.3-cp310-cp310-macosx_10_9_x86_64.whl
202de8f38fc4a45a3eea4b63e2f376e5f2dc64ef0fa692838e31a808520efaf7  numpy-1.24.3-cp310-cp310-macosx_11_0_arm64.whl
8535303847b89aa6b0f00aa1dc62867b5a32923e4d1681a35b5eef2d9591a463  numpy-1.24.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
2d926b52ba1367f9acb76b0df6ed21f0b16a1ad87c6720a1121674e5cf63e2b6  numpy-1.24.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
f21c442fdd2805e91799fbe044a7b999b8571bb0ab0f7850d0cb9641a687092b  numpy-1.24.3-cp310-cp310-win32.whl
ab5f23af8c16022663a652d3b25dcdc272ac3f83c3af4c02eb8b824e6b3ab9d7  numpy-1.24.3-cp310-cp310-win_amd64.whl
9a7721ec204d3a237225db3e194c25268faf92e19338a35f3a224469cb6039a3  numpy-1.24.3-cp311-cp311-macosx_10_9_x86_64.whl
d6cc757de514c00b24ae8cf5c876af2a7c3df189028d68c0cb4eaa9cd5afc2bf  numpy-1.24.3-cp311-cp311-macosx_11_0_arm64.whl
76e3f4e85fc5d4fd311f6e9b794d0c00e7002ec122be271f2019d63376f1d385  numpy-1.24.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
a1d3c026f57ceaad42f8231305d4653d5f05dc6332a730ae5c0bea3513de0950  numpy-1.24.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
c91c4afd8abc3908e00a44b2672718905b8611503f7ff87390cc0ac3423fb096  numpy-1.24.3-cp311-cp311-win32.whl
5342cf6aad47943286afa6f1609cad9b4266a05e7f2ec408e2cf7aea7ff69d80  numpy-1.24.3-cp311-cp311-win_amd64.whl
7776ea65423ca6a15255ba1872d82d207bd1e09f6d0894ee4a64678dd2204078  numpy-1.24.3-cp38-cp38-macosx_10_9_x86_64.whl
ae8d0be48d1b6ed82588934aaaa179875e7dc4f3d84da18d7eae6eb3f06c242c  numpy-1.24.3-cp38-cp38-macosx_11_0_arm64.whl
ecde0f8adef7dfdec993fd54b0f78183051b6580f606111a6d789cd14c61ea0c  numpy-1.24.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
4749e053a29364d3452c034827102ee100986903263e89884922ef01a0a6fd2f  numpy-1.24.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
d933fabd8f6a319e8530d0de4fcc2e6a61917e0b0c271fded460032db42a0fe4  numpy-1.24.3-cp38-cp38-win32.whl
56e48aec79ae238f6e4395886b5eaed058abb7231fb3361ddd7bfdf4eed54289  numpy-1.24.3-cp38-cp38-win_amd64.whl
4719d5aefb5189f50887773699eaf94e7d1e02bf36c1a9d353d9f46703758ca4  numpy-1.24.3-cp39-cp39-macosx_10_9_x86_64.whl
0ec87a7084caa559c36e0a2309e4ecb1baa03b687201d0a847c8b0ed476a7187  numpy-1.24.3-cp39-cp39-macosx_11_0_arm64.whl
ea8282b9bcfe2b5e7d491d0bf7f3e2da29700cec05b49e64d6246923329f2b02  numpy-1.24.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
210461d87fb02a84ef243cac5e814aad2b7f4be953b32cb53327bb49fd77fbb4  numpy-1.24.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
784c6da1a07818491b0ffd63c6bbe5a33deaa0e25a20e1b3ea20cf0e43f8046c  numpy-1.24.3-cp39-cp39-win32.whl
d5036197ecae68d7f491fcdb4df90082b0d4960ca6599ba2659957aafced7c17  numpy-1.24.3-cp39-cp39-win_amd64.whl
352ee00c7f8387b44d19f4cada524586f07379c0d49270f87233983bc5087ca0  numpy-1.24.3-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
1a7d6acc2e7524c9955e5c903160aa4ea083736fde7e91276b0e5d98e6332812  numpy-1.24.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
35400e6a8d102fd07c71ed7dcadd9eb62ee9a6e84ec159bd48c28235bbb0f8e4  numpy-1.24.3-pp38-pypy38_pp73-win_amd64.whl
ab344f1bf21f140adab8e47fdbc7c35a477dc01408791f8ba00d018dd0bc5155  numpy-1.24.3.tar.gz
numpy -

Published by charris over 1 year ago

NumPy 1.24.2 Release Notes

NumPy 1.24.2 is a maintenance release that fixes bugs and regressions
discovered after the 1.24.1 release. The Python versions supported by
this release are 3.8-3.11.

Contributors

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

  • Bas van Beek
  • Charles Harris
  • Khem Raj +
  • Mark Harfouche
  • Matti Picus
  • Panagiotis Zestanakis +
  • Peter Hawkins
  • Pradipta Ghosh
  • Ross Barnowski
  • Sayed Adel
  • Sebastian Berg
  • Syam Gadde +
  • dmbelov +
  • pkubaj +

Pull requests merged

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

  • #22965: MAINT: Update python 3.11-dev to 3.11.
  • #22966: DOC: Remove dangling deprecation warning
  • #22967: ENH: Detect CPU features on FreeBSD/powerpc64*
  • #22968: BUG: np.loadtxt cannot load text file with quoted fields separated...
  • #22969: TST: Add fixture to avoid issue with randomizing test order.
  • #22970: BUG: Fix fill violating read-only flag. (#22959)
  • #22971: MAINT: Add additional information to missing scalar AttributeError
  • #22972: MAINT: Move export for scipy arm64 helper into main module
  • #22976: BUG, SIMD: Fix spurious invalid exception for sin/cos on arm64/clang
  • #22989: BUG: Ensure correct loop order in sin, cos, and arctan2
  • #23030: DOC: Add version added information for the strict parameter in...
  • #23031: BUG: use _Alignof rather than offsetof() on most compilers
  • #23147: BUG: Fix for npyv__trunc_s32_f32 (VXE)
  • #23148: BUG: Fix integer / float scalar promotion
  • #23149: BUG: Add missing <type_traits> header.
  • #23150: TYP, MAINT: Add a missing explicit Any parameter to the npt.ArrayLike...
  • #23161: BLD: remove redundant definition of npy_nextafter [wheel build]

Checksums

MD5

73fe0b507f56c0baf43171a76ad2003f  numpy-1.24.2-cp310-cp310-macosx_10_9_x86_64.whl
2dbbe6f8a14e14978d24de9fcc8b49fe  numpy-1.24.2-cp310-cp310-macosx_11_0_arm64.whl
9ddadbf9cac2742318d8b292cb9ca579  numpy-1.24.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
969f4f33baaff53dbbbaf1a146c43534  numpy-1.24.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
6df575dff02feac835d22debb15d190e  numpy-1.24.2-cp310-cp310-win32.whl
2f939228a8c33265f2a8a1fce349d6f1  numpy-1.24.2-cp310-cp310-win_amd64.whl
c093e61421be01ffff435387839949f1  numpy-1.24.2-cp311-cp311-macosx_10_9_x86_64.whl
03d71e3d9a086b56837c461fd7c9188b  numpy-1.24.2-cp311-cp311-macosx_11_0_arm64.whl
c0dc33697d156e2b9a029095efeb1b10  numpy-1.24.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
13b57957a1f40e13f8826d14b031a6fe  numpy-1.24.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
5afd966db0b59655618c1859d98d87f6  numpy-1.24.2-cp311-cp311-win32.whl
e0b850f9c20871cd65ecb35235688f4d  numpy-1.24.2-cp311-cp311-win_amd64.whl
9a30452135ab0387b8ea9007e94e9f81  numpy-1.24.2-cp38-cp38-macosx_10_9_x86_64.whl
bdd6eede4524a230574b37e1f631f2c0  numpy-1.24.2-cp38-cp38-macosx_11_0_arm64.whl
4f930a9030d77d45a1cb6f374c91fb53  numpy-1.24.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
e77155c010f9dd63ea2815579a28c503  numpy-1.24.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
1a45f4373945eaeabeaa4020ce04e8fd  numpy-1.24.2-cp38-cp38-win32.whl
66e93d70fad16b4ccb4531e31aad36e3  numpy-1.24.2-cp38-cp38-win_amd64.whl
93a4984da83c6811367d3daf709ed25c  numpy-1.24.2-cp39-cp39-macosx_10_9_x86_64.whl
e0281b96c490ba00f1382eb3984b4e51  numpy-1.24.2-cp39-cp39-macosx_11_0_arm64.whl
ce97d81e4ae6e10241d471492391b1be  numpy-1.24.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
0c0ea440190705f98abeaa856e7da690  numpy-1.24.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
c25f7fbb185f1b8f7761bc22082d9939  numpy-1.24.2-cp39-cp39-win32.whl
7705c6b0bcf22b5e64cf248144b2f554  numpy-1.24.2-cp39-cp39-win_amd64.whl
07b6361e36e0093b580dc05799b1f03d  numpy-1.24.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
4c1466ae486b39d1a35aacb46256ec1e  numpy-1.24.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
4fea9d95e0489d06c3a24a87697d2fc0  numpy-1.24.2-pp38-pypy38_pp73-win_amd64.whl
c4212a8da1ecf17ece37e2afd0319806  numpy-1.24.2.tar.gz

SHA256

eef70b4fc1e872ebddc38cddacc87c19a3709c0e3e5d20bf3954c147b1dd941d  numpy-1.24.2-cp310-cp310-macosx_10_9_x86_64.whl
e8d2859428712785e8a8b7d2b3ef0a1d1565892367b32f915c4a4df44d0e64f5  numpy-1.24.2-cp310-cp310-macosx_11_0_arm64.whl
6524630f71631be2dabe0c541e7675db82651eb998496bbe16bc4f77f0772253  numpy-1.24.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
a51725a815a6188c662fb66fb32077709a9ca38053f0274640293a14fdd22978  numpy-1.24.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
2620e8592136e073bd12ee4536149380695fbe9ebeae845b81237f986479ffc9  numpy-1.24.2-cp310-cp310-win32.whl
97cf27e51fa078078c649a51d7ade3c92d9e709ba2bfb97493007103c741f1d0  numpy-1.24.2-cp310-cp310-win_amd64.whl
7de8fdde0003f4294655aa5d5f0a89c26b9f22c0a58790c38fae1ed392d44a5a  numpy-1.24.2-cp311-cp311-macosx_10_9_x86_64.whl
4173bde9fa2a005c2c6e2ea8ac1618e2ed2c1c6ec8a7657237854d42094123a0  numpy-1.24.2-cp311-cp311-macosx_11_0_arm64.whl
4cecaed30dc14123020f77b03601559fff3e6cd0c048f8b5289f4eeabb0eb281  numpy-1.24.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
9a23f8440561a633204a67fb44617ce2a299beecf3295f0d13c495518908e910  numpy-1.24.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
e428c4fbfa085f947b536706a2fc349245d7baa8334f0c5723c56a10595f9b95  numpy-1.24.2-cp311-cp311-win32.whl
557d42778a6869c2162deb40ad82612645e21d79e11c1dc62c6e82a2220ffb04  numpy-1.24.2-cp311-cp311-win_amd64.whl
d0a2db9d20117bf523dde15858398e7c0858aadca7c0f088ac0d6edd360e9ad2  numpy-1.24.2-cp38-cp38-macosx_10_9_x86_64.whl
c72a6b2f4af1adfe193f7beb91ddf708ff867a3f977ef2ec53c0ffb8283ab9f5  numpy-1.24.2-cp38-cp38-macosx_11_0_arm64.whl
c29e6bd0ec49a44d7690ecb623a8eac5ab8a923bce0bea6293953992edf3a76a  numpy-1.24.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
2eabd64ddb96a1239791da78fa5f4e1693ae2dadc82a76bc76a14cbb2b966e96  numpy-1.24.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
e3ab5d32784e843fc0dd3ab6dcafc67ef806e6b6828dc6af2f689be0eb4d781d  numpy-1.24.2-cp38-cp38-win32.whl
76807b4063f0002c8532cfeac47a3068a69561e9c8715efdad3c642eb27c0756  numpy-1.24.2-cp38-cp38-win_amd64.whl
4199e7cfc307a778f72d293372736223e39ec9ac096ff0a2e64853b866a8e18a  numpy-1.24.2-cp39-cp39-macosx_10_9_x86_64.whl
adbdce121896fd3a17a77ab0b0b5eedf05a9834a18699db6829a64e1dfccca7f  numpy-1.24.2-cp39-cp39-macosx_11_0_arm64.whl
889b2cc88b837d86eda1b17008ebeb679d82875022200c6e8e4ce6cf549b7acb  numpy-1.24.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
f64bb98ac59b3ea3bf74b02f13836eb2e24e48e0ab0145bbda646295769bd780  numpy-1.24.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
63e45511ee4d9d976637d11e6c9864eae50e12dc9598f531c035265991910468  numpy-1.24.2-cp39-cp39-win32.whl
a77d3e1163a7770164404607b7ba3967fb49b24782a6ef85d9b5f54126cc39e5  numpy-1.24.2-cp39-cp39-win_amd64.whl
92011118955724465fb6853def593cf397b4a1367495e0b59a7e69d40c4eb71d  numpy-1.24.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
f9006288bcf4895917d02583cf3411f98631275bc67cce355a7f39f8c14338fa  numpy-1.24.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
150947adbdfeceec4e5926d956a06865c1c690f2fd902efede4ca6fe2e657c3f  numpy-1.24.2-pp38-pypy38_pp73-win_amd64.whl
003a9f530e880cb2cd177cba1af7220b9aa42def9c4afc2a2fc3ee6be7eb2b22  numpy-1.24.2.tar.gz