Update dependency numpy to v1.25.2 - abandoned#26
Closed
renovate[bot] wants to merge 2 commits intomainfrom
Closed
Update dependency numpy to v1.25.2 - abandoned#26renovate[bot] wants to merge 2 commits intomainfrom
renovate[bot] wants to merge 2 commits intomainfrom
Conversation
a3cd038 to
c3a8741
Compare
c3a8741 to
348e0a7
Compare
Author
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
Author
Autoclosing SkippedThis PR has been flagged for autoclosing. However, it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==1.24.3->==1.25.2Release Notes
numpy/numpy (numpy)
v1.25.2Compare Source
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.
Pull requests merged
A total of 19 pull requests were merged for this release.
-ftrapping-mathwith Clang on macOSnp.__all__getenvcall used for memory policy warningChecksums
MD5
SHA256
v1.25.1Compare Source
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.
Pull requests merged
A total of 14 pull requests were merged for this release.
return NULLto begoto fail__array_ufunc__works without any kwargs passedChecksums
MD5
SHA256
v1.25.0Compare Source
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:
@=).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.MachAris deprecated. It is private API. In names definedin
np.coreshould generally be considered private.(gh-22638)
np.finfo(None)is deprecated.(gh-23011)
np.round_is deprecated. Usenp.roundinstead.(gh-23302)
np.productis deprecated. Usenp.prodinstead.(gh-23314)
np.cumproductis deprecated. Usenp.cumprodinstead.(gh-23314)
np.sometrueis deprecated. Usenp.anyinstead.(gh-23314)
np.alltrueis deprecated. Usenp.allinstead.(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 thefuture, this will be limited to arrays of ndim 0 (e.g.,
np.array(3.14)). The following expressions will report adeprecation warning:
(gh-10615)
numpy.find_common_typeis now deprecated and its useshould be replaced with either
numpy.result_typeornumpy.promote_types. Most users leave the secondscalar_typesargument tofind_common_typeas[]in which casenp.result_typeandnp.promote_typesare both faster and morerobust. When not using
scalar_typesthe main difference is thatthe replacement intentionally converts non-native byte-order to
native byte order. Further,
find_common_typereturnsobjectdtype 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_typesargument is not[]things are morecomplicated. In most cases, using
np.result_typeand passing thePython values
0,0.0, or0jhas the same result as usingint,float, orcomplexinscalar_types.When
scalar_typesis constructed,np.result_typeis the correctreplacement and it may be passed scalar values like
np.float32(0.0). Passing values other than 0, may lead tovalue-inspecting behavior (which
np.find_common_typenever usedand 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_typesorwhen non-numeric dtypes are likely, please do not hesitate to open a
NumPy issue to ask for help.
(gh-22539)
Expired deprecations
np.core.macharandnp.finfo.macharhave been removed.(gh-22638)
+arrwill now raise an error when the dtype is not numeric (andpositive is undefined).
(gh-22998)
A sequence must now be passed into the stacking family of functions
(
stack,vstack,hstack,dstackandcolumn_stack).(gh-23019)
np.clipnow defaults to same-kind casting. Falling back to unsafecasting was deprecated in NumPy 1.17.
(gh-23403)
np.clipwill now propagatenp.nanvalues passed asminormax. Previously, a scalar NaN was usually ignored. This wasdeprecated in NumPy 1.17.
(gh-23403)
The
np.dualsubmodule 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
FutureWarningwhen casting to a subarray dtype inastypeor the array creation functions such asasarrayis nowfinalized. 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
Trueor allFalsewhen values arefundamentally not comparable (e.g. have different dtypes). An
example is
np.array(["a"]) == np.array([1]).This mimics the Python behavior of returning
FalseandTruewhen comparing incompatible types like
"a" == 1and"a" != 1. For a long time these gaveDeprecationWarningorFutureWarning.(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:
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:
(gh-23041)
The
numpy.testing.utilsshim has been removed. Importing from thenumpy.testing.utilsshim has been deprecated since 2019, the shimhas 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_FUNCTIONenvironmentvariable has been removed. This variable disabled dispatching with
__array_function__.(gh-23376)
Support for
y=as an alias ofout=has been removed. Thefix,isposinfandisneginffunctions allowed usingy=as a(deprecated) alias for
out=. This is no longer supported.(gh-23376)
Compatibility notes
The
busday_countmethod now correctly handles cases where thebegindatesis later in time than theenddates. Previously, theenddateswas included, even though the documentation states it isalways excluded.
(gh-23229)
When comparing datetimes and timedelta using
np.equalornp.not_equalnumpy previously allowed the comparison withcasting="unsafe". This operation now fails. Forcing the outputdtype using the
dtypekwarg can make the operation succeed, but wedo not recommend it.
(gh-22707)
When loading data from a file handle using
np.load, if the handleis at the end of file, as can happen when reading multiple arrays by
calling
np.loadrepeatedly, numpy previously raisedValueErrorif
allow_pickle=False, andOSErrorifallow_pickle=True. Nowit raises
EOFErrorinstead, in both cases.(gh-23105)
np.padwithmode=wrappads with strict multiples of original dataCode based on earlier version of
padthat usesmode="wrap"willreturn different results when the padding size is larger than initial
array.
np.padwithmode=wrapnow always fills the space with strictmultiples of original data even if the padding size is larger than the
initial array.
(gh-22575)
Cython
long_tandulong_tremovedlong_tandulong_twere aliases forlonglong_tandulonglong_tand confusing (a remainder from of Python 2). This change may lead to
the errors:
We recommend use of bit-sized types such as
cnp.int64_tor the use ofcnp.intp_twhich is 32 bits on 32 bit systems and 64 bits on 64 bitsystems (this is most compatible with indexing). If C
longis desired,use plain
longornpy_long.cnp.int_tis alsolong(NumPy'sdefault integer). However,
longis 32 bit on 64 bit windows and we maywish 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
axesargument toufuncThe error message and type when a wrong
axesvalue is passed toufunc(..., axes=[...])has changed. The message is now moreindicative of the problem, and if the value is mismatched an
AxisErrorwill be raised. ATypeErrorwill still be raised forinvalidinput types.
(gh-22675)
Array-likes that define
__array_ufunc__can now override ufuncs if used aswhereIf the
wherekeyword argument of anumpy.ufunc{.interpreted-textrole="class"} is a subclass of
numpy.ndarray{.interpreted-textrole="class"} or is a duck type that defines
numpy.class.__array_ufunc__{.interpreted-text role="func"} it canoverride 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 thewhereargument to pass it into the default implementation of the
ufuncor,for
numpy.ndarray{.interpreted-text role="class"} subclasses beforeusing
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-numpyunnecessary.Libraries can override the default minimal version to be compatible with
using:
before including NumPy or by passing the equivalent
-Doption to thecompiler. The NumPy 1.25 default is
NPY_1_19_API_VERSION. Because theNumPy 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.einsumnow accepts arrays withobjectdtypeThe code path will call python operators on object dtype arrays, much
like
np.dotandnp.matmul.(gh-18053)
Add support for inplace matrix multiplication
It is now possible to perform inplace matrix multiplication via the
@=operator.
(gh-21120)
Added
NPY_ENABLE_CPU_FEATURESenvironment variableUsers may now choose to enable only a subset of the built CPU features
at runtime by specifying the
NPY_ENABLE_CPU_FEATURESenvironment 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.exceptionsnamespaceNumPy 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.linalgfunctions return NamedTuplesnp.linalgfunctions that return tuples now return namedtuples. Thesefunctions are
eig(),eigh(),qr(),slogdet(), andsvd(). Thereturn 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.charare compatible with NEP 42 custom dtypesCustom 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 tonp.dtype('U8'). This feature is most useful when writing generic codedealing 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:
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
NDArrayOperatorsMixinspecifies that it has no__slots__The
NDArrayOperatorsMixinclass now specifies that it contains no__slots__, ensuring that subclasses can now make use of this featurein Python.
(gh-23113)
Fix power of complex zero
np.powernow returns a different result for0^{non-zero}for complexnumbers. 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+0jor0-0j.(gh-18535)
New
DTypePromotionErrorNumPy now has a new
DTypePromotionErrorwhich is used when two dtypescannot be promoted to a common one, for example:
raises this new exception.
(gh-22707)
np.show_configuses information from MesonBuild and system information now contains information from Meson.
np.show_confignow has a new optional parametermodetohelp customize the output.
(gh-22769)
Fix
np.ma.diffnot preserving the mask when called with arguments prepend/append.Calling
np.ma.diffwith arguments prepend and/or append now returns aMaskedArraywith the input mask preserved.Previously, a
MaskedArraywithout 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 -1orexcept *. These have nowbeen added.
(gh-22997)
Ability to directly spawn random number generators
numpy.random.Generator.spawnnow allows to directly spawn new independentchild generators via the
numpy.random.SeedSequence.spawnmechanism.numpy.random.BitGenerator.spawndoes the same for the underlying bitgenerator.
Additionally,
numpy.random.BitGenerator.seed_seqnow givesdirect access to the seed sequence used for initializing the bit
generator. This allows for example:
safely use rng, child_rng1, and child_rng2
Previously, this was hard to do without passing the
SeedSequenceexplicitly. Please see
numpy.random.SeedSequencefor moreinformation.
(gh-23195)
numpy.logspacenow supports a non-scalarbaseargumentThe
baseargument ofnumpy.logspacecan now be array-like if it isbroadcastable against the
startandstoparguments.(gh-23275)
np.ma.dot()now supports for non-2d arraysPreviously
np.ma.dot()only worked ifaandbwere both 2d. Now itworks for non-2d arrays as well as
np.dot().(gh-23322)
Explicitly show keys of .npz file in repr
NpzFileshows keys of loaded .npz file when printed.(gh-23357)
NumPy now exposes DType classes in
np.dtypesThe new
numpy.dtypesmodule now exposes DType classes and will containfuture 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
*.npyfile containing a table with a dtype with metadata cannotbe read back. Now,
np.saveandnp.savezdrop metadata before saving.(gh-23371)
numpy.lib.recfunctions.structured_to_unstructuredreturns views in more casesstructured_to_unstructurednow returns a view, if the stride betweenthe fields is constant. Prior, padding between the fields or a reversed
field would lead to a copy. This change only applies to
ndarray,memmapandrecarray. For all other array subclasses, the behaviorremains unchanged.
(gh-23652)
Signed and unsigned integers always compare correctly
When
uint64andint64are mixed in NumPy, NumPy typically promotesboth to
float64. This behavior may be argued about but is confusingfor comparisons
==,<=, since the results returned can be incorrectbut 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.argsorton AVX-512 enabled processors32-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.sorton AVX-512 enabled processorsQuicksort 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 fasterThe 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.atcan be much fasterGeneric
ufunc.atcan be up to 9x faster. The conditions for thisspeedup:
If ufuncs with appropriate indexed loops on 1d arguments with the above
conditions,
ufunc.atcan be up to 60x faster (an additional 7xspeedup). 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
NpzFileMembership test on
NpzFilewill no longer decompress the archive if itis successful.
(gh-23661)
Changes
np.r_[]andnp.c_[]with certain scalar valuesIn rare cases, using mainly
np.r_with scalars can lead to differentresults. The main potential changes are highlighted by the following:
Where the second example returned:
The first one is due to a signed integer scalar with an unsigned integer
array, while the second is due to
255not fitting intoint8andNumPy 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 anerror.)
(gh-22539)
Most NumPy functions are wrapped into a C-callable
To speed up the
__array_function__dispatching, most NumPy functionsare 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_umathextension is linked with the C++ linker.(gh-23601)
Checksums
MD5
SHA256
v1.24.4Compare Source
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.
Pull requests merged
A total of 6 pull requests were merged for this release.
metadataparameter of...Checksums
MD5
SHA256
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.