-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update dependency numpy to v1 [SECURITY] #595
base: dev
Are you sure you want to change the base?
Conversation
⚠ Artifact update problemRenovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is. ♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
The artifact failure details are included below: File name: Dockerfile-assets/Pipfile.lock
|
a6304df
to
a02a844
Compare
a02a844
to
1fdaaf2
Compare
1fdaaf2
to
e04e35c
Compare
e04e35c
to
65fd729
Compare
65fd729
to
a6e725e
Compare
a6e725e
to
4d4081e
Compare
4d4081e
to
5344cd3
Compare
5344cd3
to
589aae0
Compare
589aae0
to
c49e478
Compare
c49e478
to
6385d17
Compare
6385d17
to
f9a0a0b
Compare
f9a0a0b
to
2d777e6
Compare
2d777e6
to
cc14910
Compare
7102f9c
to
d8cf5e8
Compare
d8cf5e8
to
11b2bb6
Compare
11b2bb6
to
324fdef
Compare
324fdef
to
18fe9a8
Compare
18fe9a8
to
96c4cbe
Compare
96c4cbe
to
0a31476
Compare
0a31476
to
c8fda75
Compare
c8fda75
to
d267eb3
Compare
d267eb3
to
f584a5e
Compare
Quality Gate passedIssues Measures |
f584a5e
to
31cf54b
Compare
31cf54b
to
32b64d0
Compare
32b64d0
to
c78063f
Compare
c78063f
to
0c9f847
Compare
Quality Gate passedIssues Measures |
This PR contains the following updates:
<1.22.0
-><1.22.1
GitHub Vulnerability Alerts
CVE-2021-34141
Incomplete string comparison in the numpy.core component in NumPy1.9.x, which allows attackers to fail the APIs via constructing specific string objects.
Release Notes
numpy/numpy (numpy)
v1.22.0
Compare Source
NumPy 1.22.0 Release Notes
NumPy 1.22.0 is a big release featuring the work of 153 contributors
spread over 609 pull requests. There have been many improvements,
highlights are:
is a moving target, so there will likely be further improvements,
but the major work is done. This is probably the most user visible
enhancement in this release.
a step in creating a standard collection of functions that can be
used across application such as CuPy and JAX.
format for array (tensor) data.
quantile
,percentile
, and related functions. Thenew methods provide a complete set of the methods commonly found in
the literature.
These are in addition to the ongoing work to provide SIMD support for
commonly used functions, improvements to F2PY, and better documentation.
The Python versions supported in this release are 3.8-3.10, Python 3.7
has been dropped. Note that 32 bit wheels are only provided for Python
3.8 and 3.9 on Windows, all other wheels are 64 bits on account of
Ubuntu, Fedora, and other Linux distributions dropping 32 bit support.
All 64 bit wheels are also linked with 64 bit integer OpenBLAS, which should fix
the occasional problems encountered by folks using truly huge arrays.
Expired deprecations
Deprecated numeric style dtype strings have been removed
Using the strings
"Bytes0"
,"Datetime64"
,"Str0"
,"Uint32"
,and
"Uint64"
as a dtype will now raise aTypeError
.(gh-19539)
Expired deprecations for
loads
,ndfromtxt
, andmafromtxt
in npyionumpy.loads
was deprecated in v1.15, with the recommendation thatusers use
pickle.loads
instead.ndfromtxt
andmafromtxt
were bothdeprecated in v1.17 - users should use
numpy.genfromtxt
instead withthe appropriate value for the
usemask
parameter.(gh-19615)
Deprecations
Use delimiter rather than delimitor as kwarg in mrecords
The misspelled keyword argument
delimitor
ofnumpy.ma.mrecords.fromtextfile()
has been changed todelimiter
,using it will emit a deprecation warning.
(gh-19921)
Passing boolean
kth
values to (arg-)partition has been deprecatednumpy.partition
andnumpy.argpartition
would previously acceptboolean values for the
kth
parameter, which would subsequently beconverted into integers. This behavior has now been deprecated.
(gh-20000)
The
np.MachAr
class has been deprecatedThe
numpy.MachAr
class andfinfo.machar <numpy.finfo>
attribute havebeen deprecated. Users are encouraged to access the property if interest
directly from the corresponding
numpy.finfo
attribute.(gh-20201)
Compatibility notes
Distutils forces strict floating point model on clang
NumPy now sets the
-ftrapping-math
option on clang to enforce correctfloating point error handling for universal functions. Clang defaults to
non-IEEE and C99 conform behaviour otherwise. This change (using the
equivalent but newer
-ffp-exception-behavior=strict
) was attempted inNumPy 1.21, but was effectively never used.
(gh-19479)
Removed floor division support for complex types
Floor division of complex types will now result in a
TypeError
(gh-19135)
numpy.vectorize
functions now produce the same output class as the base functionWhen a function that respects
numpy.ndarray
subclasses is vectorizedusing
numpy.vectorize
, the vectorized function will now besubclass-safe also for cases that a signature is given (i.e., when
creating a
gufunc
): the output class will be the same as that returnedby the first call to the underlying function.
(gh-19356)
Python 3.7 is no longer supported
Python support has been dropped. This is rather strict, there are
changes that require Python >= 3.8.
(gh-19665)
str/repr of complex dtypes now include space after punctuation
The repr of
np.dtype({"names": ["a"], "formats": [int], "offsets": [2]})
is nowdtype({'names': ['a'], 'formats': ['<i8'], 'offsets': [2], 'itemsize': 10})
,whereas spaces where previously omitted after colons and between fields.
The old behavior can be restored via
np.set_printoptions(legacy="1.21")
.(gh-19687)
Corrected
advance
inPCG64DSXM
andPCG64
Fixed a bug in the$2^{64}$ on platforms
advance
method ofPCG64DSXM
andPCG64
. The bugonly affects results when the step was larger than
that do not support 128-bit integers(e.g., Windows and 32-bit Linux).
(gh-20049)
Change in generation of random 32 bit floating point variates
There was bug in the generation of 32 bit floating point values from the
uniform distribution that would result in the least significant bit of
the random variate always being 0. This has been fixed.
This change affects the variates produced by the
random.Generator
methods
random
,standard_normal
,standard_exponential
, andstandard_gamma
, but only when the dtype is specified asnumpy.float32
.(gh-20314)
C API changes
Masked inner-loops cannot be customized anymore
The masked inner-loop selector is now never used. A warning will be
given in the unlikely event that it was customized.
We do not expect that any code uses this. If you do use it, you must
unset the selector on newer NumPy version. Please also contact the NumPy
developers, we do anticipate providing a new, more specific, mechanism.
The customization was part of a never-implemented feature to allow for
faster masked operations.
(gh-19259)
New Features
NEP 49 configurable allocators
As detailed in NEP 49, the
function used for allocation of the data segment of a ndarray can be
changed. The policy can be set globally or in a context. For more
information see the NEP and the
data_memory
{.interpreted-textrole="ref"} reference docs. Also add a
NUMPY_WARN_IF_NO_MEM_POLICY
override to warn on dangerous use of transfering ownership by setting
NPY_ARRAY_OWNDATA
.(gh-17582)
Implementation of the NEP 47 (adopting the array API standard)
An initial implementation of NEP47, adoption
of the array API standard, has been added as
numpy.array_api
. Theimplementation is experimental and will issue a UserWarning on import,
as the array API standard is still in
draft state.
numpy.array_api
is a conforming implementation of thearray API standard, which is also minimal, meaning that only those
functions and behaviors that are required by the standard are
implemented (see the NEP for more info). Libraries wishing to make use
of the array API standard are encouraged to use
numpy.array_api
tocheck that they are only using functionality that is guaranteed to be
present in standard conforming implementations.
(gh-18585)
Generate C/C++ API reference documentation from comments blocks is now possible
This feature depends on Doxygen in
the generation process and on
Breathe to integrate it
with Sphinx.
(gh-18884)
Assign the platform-specific
c_intp
precision via a mypy pluginThe mypy plugin, introduced in
numpy/numpy#17843, has
again been expanded: the plugin now is now responsible for setting the
platform-specific precision of
numpy.ctypeslib.c_intp
, the latterbeing used as data type for various
numpy.ndarray.ctypes
attributes.Without the plugin, aforementioned type will default to
ctypes.c_int64
.To enable the plugin, one must add it to their mypy configuration
file:
(gh-19062)
Add NEP 47-compatible dlpack support
Add a
ndarray.__dlpack__()
method which returns adlpack
C structurewrapped in a
PyCapsule
. Also add anp._from_dlpack(obj)
function,where
obj
supports__dlpack__()
, and returns anndarray
.(gh-19083)
keepdims
optional argument added tonumpy.argmin
,numpy.argmax
keepdims
argument is added tonumpy.argmin
,numpy.argmax
. If setto
True
, the axes which are reduced are left in the result asdimensions with size one. The resulting array has the same number of
dimensions and will broadcast with the input array.
(gh-19211)
bit_count
to compute the number of 1-bits in an integerComputes the number of 1-bits in the absolute value of the input. This
works on all the numpy integer types. Analogous to the builtin
int.bit_count
orpopcount
in C++.(gh-19355)
The
ndim
andaxis
attributes have been added tonumpy.AxisError
The
ndim
andaxis
parameters are now also stored as attributeswithin each
numpy.AxisError
instance.(gh-19459)
Preliminary support for
windows/arm64
targetnumpy
added support for windows/arm64 target. Please noteOpenBLAS
support is not yet available for windows/arm64 target.
(gh-19513)
Added support for LoongArch
LoongArch is a new instruction set, numpy compilation failure on
LoongArch architecture, so add the commit.
(gh-19527)
A
.clang-format
file has been addedClang-format is a C/C++ code formatter, together with the added
.clang-format
file, it produces code close enough to the NumPyC_STYLE_GUIDE for general use. Clang-format version 12+ is required
due to the use of several new features, it is available in Fedora 34 and
Ubuntu Focal among other distributions.
(gh-19754)
is_integer
is now available tonumpy.floating
andnumpy.integer
Based on its counterpart in Python
float
andint
, the numpy floatingpoint and integer types now support
float.is_integer
. ReturnsTrue
if the number is finite with integral value, and
False
otherwise.(gh-19803)
Symbolic parser for Fortran dimension specifications
A new symbolic parser has been added to f2py in order to correctly parse
dimension specifications. The parser is the basis for future
improvements and provides compatibility with Draft Fortran 202x.
(gh-19805)
ndarray
,dtype
andnumber
are now runtime-subscriptableMimicking PEP-585, the
numpy.ndarray
,numpy.dtype
andnumpy.number
classes are now subscriptable forpython 3.9 and later. Consequently, expressions that were previously
only allowed in .pyi stub files or with the help of
from __future__ import annotations
are now also legal during runtime.(gh-19879)
Improvements
ctypeslib.load_library
can now take any path-like objectAll parameters in the can now take any
python:path-like object
{.interpreted-text role="term"}. This includesthe likes of strings, bytes and objects implementing the
__fspath__<os.PathLike.__fspath__>
{.interpreted-text role="meth"}protocol.
(gh-17530)
Add
smallest_normal
andsmallest_subnormal
attributes tofinfo
The attributes
smallest_normal
andsmallest_subnormal
are availableas an extension of
finfo
class for any floating-point data type. Touse these new attributes, write
np.finfo(np.float64).smallest_normal
or
np.finfo(np.float64).smallest_subnormal
.(gh-18536)
numpy.linalg.qr
accepts stacked matrices as inputsnumpy.linalg.qr
is able to produce results for stacked matrices asinputs. Moreover, the implementation of QR decomposition has been
shifted to C from Python.
(gh-19151)
numpy.fromregex
now acceptsos.PathLike
implementationsnumpy.fromregex
now accepts objects implementing the__fspath__<os.PathLike>
protocol, e.g.pathlib.Path
.(gh-19680)
Add new methods for
quantile
andpercentile
quantile
andpercentile
now have have amethod=
keyword argumentsupporting 13 different methods. This replaces the
interpolation=
keyword argument.
The methods are now aligned with nine methods which can be found in
scientific literature and the R language. The remaining methods are the
previous discontinuous variations of the default "linear" one.
Please see the documentation of
numpy.percentile
for more information.(gh-19857)
Missing parameters have been added to the
nan<x>
functionsA number of the
nan<x>
functions previously lacked parameters thatwere present in their
<x>
-based counterpart, e.g. thewhere
parameter was present in
numpy.mean
but absent fromnumpy.nanmean
.The following parameters have now been added to the
nan<x>
functions:initial
&where
initial
&where
keepdims
&out
keepdims
&out
initial
&where
initial
&where
where
where
where
(gh-20027)
Annotating the main Numpy namespace
Starting from the 1.20 release, PEP 484 type annotations have been
included for parts of the NumPy library; annotating the remaining
functions being a work in progress. With the release of 1.22 this
process has been completed for the main NumPy namespace, which is now
fully annotated.
Besides the main namespace, a limited number of sub-packages contain
annotations as well. This includes, among others,
numpy.testing
,numpy.linalg
andnumpy.random
(available since 1.21).(gh-20217)
Vectorize umath module using AVX-512
By leveraging Intel Short Vector Math Library (SVML), 18 umath functions
(
exp2
,log2
,log10
,expm1
,log1p
,cbrt
,sin
,cos
,tan
,arcsin
,arccos
,arctan
,sinh
,cosh
,tanh
,arcsinh
,arccosh
,arctanh
) are vectorized using AVX-512 instruction set forboth single and double precision implementations. This change is
currently enabled only for Linux users and on processors with AVX-512
instruction set. It provides an average speed up of 32x and 14x for
single and double precision functions respectively.
(gh-19478)
OpenBLAS v0.3.18
Update the OpenBLAS used in testing and in wheels to v0.3.18
(gh-20058)
Checksums
MD5
SHA256
v1.21.6
Compare Source
NumPy 1.21.6 Release Notes
NumPy 1.21.6 is a very small release that achieves two things:
The provision of the 32 bit wheel is intended to make life easier for
oldest-supported-numpy.
Checksums
MD5
SHA256
v1.21.5
Compare Source
NumPy 1.21.5 Release Notes
NumPy 1.21.5 is a maintenance release that fixes a few bugs discovered
after the 1.21.4 release and does some maintenance to extend the 1.21.x
lifetime. The Python versions supported in this release are 3.7-3.10. If
you want to compile your own version using gcc-11, you will need to use
gcc-11.2+ to avoid problems.
Contributors
A total of 7 people contributed to this release. People with a "+" by
their names contributed a patch for the first time.
Pull requests merged
A total of 11 pull requests were merged for this release.
__(deep)copy__
calls of_GenericAlias
...npymath
to respectnpy_longdouble
npy_load_module
Checksums
MD5
SHA256
v1.21.4
Compare Source
NumPy 1.21.4 Release Notes
The NumPy 1.21.4 is a maintenance release that fixes a few bugs
discovered after 1.21.3. The most important fix here is a fix for the
NumPy header files to make them work for both x86_64 and M1 hardware
when included in the Mac universal2 wheels. Previously, the header files
only worked for M1 and this caused problems for folks building x86_64
extensions. This problem was not seen before Python 3.10 because there
were thin wheels for x86_64 that had precedence. This release also
provides thin x86_64 Mac wheels for Python 3.10.
The Python versions supported in this release are 3.7-3.10. If you want
to compile your own version using gcc-11, you will need to use gcc-11.2+
to avoid problems.
Contributors
A total of 7 people contributed to this release. People with a "+" by
their names contributed a patch for the first time.
Pull requests merged
A total of 9 pull requests were merged for this release.
dtype
in type stubVOID_nonzero
could sometimes mutate alignment flagArrayterator
typing test failureChecksums
MD5
SHA256
v1.21.3
Compare Source
NumPy 1.21.3 Release Notes
The NumPy 1.21.3 is a maintenance release the fixes a few bugs
discovered after 1.21.2. It also provides 64 bit Python 3.10.0 wheels.
Note a few oddities about Python 3.10:
The Python versions supported in this release are 3.7-3.10. If you want
to compile your own version using gcc-11 you will need to use gcc-11.2+
to avoid problems.
Contributors
A total of 7 people contributed to this release. People with a "+" by
their names contributed a patch for the first time.
Pull requests merged
A total of 8 pull requests were merged for this release.
`generic
/ndarray
methodsChecksums
MD5
SHA256
v1.21.2
Compare Source
NumPy 1.21.2 Release Notes
The NumPy 1.21.2 is maintenance release that fixes bugs discovered after
1.21.1. It also provides 64 bit manylinux Python 3.10.0rc1 wheels for
downstream testing. Note that Python 3.10 is not yet final. There is
also preliminary support for Windows on ARM64 builds, but there is no
OpenBLAS for that platform and no wheels are available.
The Python versions supported for this release are 3.7-3.9. The 1.21.x
series is compatible with Python 3.10.0rc1 and Python 3.10 will be
officially supported after it is released. The previous problems with
gcc-11.1 have been fixed by gcc-11.2, check your version if you are
using gcc-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 18 pull requests were merged for this release.
<3.11
numpy.typing
could raiseConfiguration
📅 Schedule: Branch creation - "" (UTC), 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 was generated by Mend Renovate. View the repository job log.