10000 Merge branch 'master' into add-shape-to-like-array-creation · pentschev/numpy@c3ac08e · GitHub
[go: up one dir, main page]

Skip to content

Commit c3ac08e

Browse files
authored
Merge branch 'master' into add-shape-to-like-array-creation
2 parents f53afbe + 31e71d7 commit c3ac08e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+2156
-1586
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ matrix:
6969
env:
7070
# for matrix annotation only
7171
- PPC64_LE=1
72+
# use POWER8 OpenBLAS build, not system ATLAS
73+
- ATLAS=None
7274

7375
before_install:
7476
- ./tools/travis-before-install.sh

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ include MANIFEST.in
88
include pytest.ini
99
include *.txt
1010
include site.cfg.example
11-
include numpy/random/mtrand/generate_mtrand_c.py
1211
recursive-include numpy/random/mtrand *.pyx *.pxd
1312
# Add build support that should go in sdist, but not go in bdist/be installed
1413
# Note that sub-directories that don't have __init__ are apparently not

benchmarks/benchmarks/bench_function_base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ class Sort(Benchmark):
199199
['quick', 'merge', 'heap'],
200200
['float64', 'int64', 'uint64'],
201201
[
202+
('random',),
202203
('ordered',),
203204
('reversed',),
204205
('uniform',),

doc/release/1.16.1-notes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ Improvements
8080

8181
Further improvements to ``ctypes`` support in ``np.ctypeslib``
8282
--------------------------------------------------------------
83-
A new ``np.ctypeslib.as_ctypes_type`` function has been added, which can be
83+
A new `numpy.ctypeslib.as_ctypes_type` function has been added, which can be
8484
used to converts a `dtype` into a best-guess `ctypes` type. Thanks to this
85-
new function, ``np.ctypeslib.as_ctypes`` now supports a much wider range of
85+
new function, `numpy.ctypeslib.as_ctypes` now supports a much wider range of
8686
array types, including structures, booleans, and integers of non-native
8787
endianness.
8888

doc/release/1.17.0-notes.rst

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ non-functional. This code was removed. If needed, use
7777
If the out argument to these functions is provided and has memory overlap with
7878
the other arguments, it is now buffered to avoid order-dependent behavior.
7979

80+
Unpickling while loading requires explicit opt-in
81+
-------------------------------------------------
82+
The functions ``np.load``, and ``np.lib.format.read_array`` take an
83+
`allow_pickle` keyword which now defaults to ``False`` in response to
84+
`CVE-2019-6446 <https://nvd.nist.gov/vuln/detail/CVE-2019-6446>`_.
8085

8186
C API changes
8287
=============
@@ -129,6 +134,7 @@ New mode "empty" for ``np.pad``
129134
This mode pads an array to a desired shape without initializing the new
130135
entries.
131136

137+
132138
``np.empty_like`` and related functions now accept a ``shape`` argument
133139
-----------------------------------------------------------------------
134140
``np.empty_like``, ``np.full_like``, ``np.ones_like`` and ``np.zeros_like`` now
@@ -138,6 +144,12 @@ when combined with the ``__array_function__`` protocol, allowing the creation
138144
of new arbitrary-shape arrays from NumPy-like libraries when such an array
139145
is used as the prototype.
140146

147+
Floating point scalars implement ``as_integer_ratio`` to match the builtin float
148+
--------------------------------------------------------------------------------
149+
This returns a (numerator, denominator) pair, which can be used to construct a
150+
`fractions.Fraction`.
151+
152+
141153
Improvements
142154
============
143155

@@ -161,9 +173,9 @@ lengths has improved and is on par with complex-valued FFTs.
161173

162174
Further improvements to ``ctypes`` support in ``np.ctypeslib``
163175
--------------------------------------------------------------
164-
A new ``np.ctypeslib.as_ctypes_type`` function has been added, which can be
176+
A new `numpy.ctypeslib.as_ctypes_type` function has been added, which can be
165177
used to converts a `dtype` into a best-guess `ctypes` type. Thanks to this
166-
new function, ``np.ctypeslib.as_ctypes`` now supports a much wider range of
178+
new function, `numpy.ctypeslib.as_ctypes` now supports a much wider range of
167179
array types, including structures, booleans, and integers of non-native
168180
endianness.
169181

@@ -206,6 +218,17 @@ The boolean and integer types are incapable of storing ``np.nan`` and ``np.inf``
206218
which allows us to provide specialized ufuncs that are up to 250x faster than the current
207219
approach.
208220

221+
``np.isfinite`` supports ``datetime64`` and ``timedelta64`` types
222+
-----------------------------------------------------------------
223+
Previously, `np.isfinite` used to raise a ``TypeError`` on being used on these
224+
two types.
225+
226+
New keywords added to ``np.nan_to_num``
227+
---------------------------------------
228+
``np.nan_to_num`` now accepts keywords ``nan``, ``posinf`` and ``neginf`` allowing the
229+
user to define the value to replace the ``nan``, positive and negative ``np.inf`` values
230+
respectively.
231+
209232

210233
Changes
211234
=======

doc/source/dev/governance/people.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ NumFOCUS Subcommittee
5656
Institutional Partners
5757
----------------------
5858

59-
* UC Berkeley (Stefan van der Walt)
59+
* UC Berkeley (Stefan van der Walt, Matti Picus, Tyler Reddy)
6060

61+
* Quansight (Ralf Gommers, Hameer Abbasi)
6162

62-
Document history
63-
----------------
64-
65-
https://github.com/numpy/numpy/commits/master/doc/source/dev/governance/governance.rst

doc/source/reference/routines.ctypeslib.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ C-Types Foreign Function Interface (:mod:`numpy.ctypeslib`)
88

99
.. autofunction:: as_array
1010
.. autofunction:: as_ctypes
11+
.. autofunction:: as_ctypes_type
1112
.. autofunction:: ctypes_load_library
1213
.. autofunction:: load_library
1314
.. autofunction:: ndpointer

doc/source/reference/routines.math.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ Handling complex numbers
141141
real
142142
imag
143143
conj
144+
conjugate
144145

145146

146147
Miscellaneous

doc/source/reference/ufuncs.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,7 @@ Math operations
586586
sign
587587
heaviside
588588
conj
589+
conjugate
589590
exp
590591
exp2
591592
log

doc/source/user/quickstart.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1476,5 +1476,5 @@ Further reading
14761476
- The `Python tutorial <https://docs.python.org/tutorial/>`__
14771477
- :ref:`reference`
14781478
- `SciPy Tutorial <https://docs.scipy.org/doc/scipy/reference/tutorial/index.html>`__
1479-
- `SciPy Lecture Notes <https://www.scipy-lectures.org>`__
1479+
- `SciPy Lecture Notes <https://scipy-lectures.org>`__
14801480
- A `matlab, R, IDL, NumPy/SciPy dictionary <http://mathesaurus.sf.net/>`__

0 commit comments

Comments
 (0)
0