Releases: numpy/numpy
v1.13.1
==========================
NumPy 1.13.1 Release Notes
This is a bugfix release for problems found in 1.13.0. The major changes are
fixes for the new memory overlap detection and temporary elision as well as
reversion of the removal of the boolean binary -
operator. Users of 1.13.0
should upgrade.
Thr Python versions supported are 2.7 and 3.4 - 3.6. Note that the Python 3.6
wheels available from PIP are built against 3.6.1, hence will not work when
used with 3.6.0 due to Python bug 29943_. NumPy 1.13.2 will be released shortly
after Python 3.6.2 is out to fix that problem. If you are using 3.6.0 the
workaround is to upgrade to 3.6.1 or use an earlier Python version.
.. _#29943: https://bugs.python.org/issue29943
Pull requests merged
A total of 19 pull requests were merged for this release.
- #9240 DOC: BLD: fix lots of Sphinx warnings/errors.
- #9255 Revert "DEP: Raise TypeError for subtract(bool_, bool_)."
- #9261 BUG: don't elide into readonly and updateifcopy temporaries for...
- #9262 BUG: fix missing keyword rename for common block in numpy.f2py
- #9263 BUG: handle resize of 0d array
- #9267 DOC: update f2py front page and some doc build metadata.
- #9299 BUG: Fix Intel compilation on Unix.
- #9317 BUG: fix wrong ndim used in empty where check
- #9319 BUG: Make extensions compilable with MinGW on Py2.7
- #9339 BUG: Prevent crash if ufunc doc string is null
- #9340 BUG: umath: un-break ufunc where= when no out= is given
- #9371 DOC: Add isnat/positive ufunc to documentation
- #9372 BUG: Fix error in fromstring function from numpy.core.records...
- #9373 BUG: ')' is printed at the end pointer of the buffer in numpy.f2py.
- #9374 DOC: Create NumPy 1.13.1 release notes.
- #9376 BUG: Prevent hang traversing ufunc userloop linked list
- #9377 DOC: Use x1 and x2 in the heaviside docstring.
- #9378 DOC: Add $PARAMS to the isnat docstring
- #9379 DOC: Update the 1.13.1 release notes
Contributors
A total of 12 people contributed to this release. People with a "+" by their
names contributed a patch for the first time.
- Andras Deak +
- Bob Eldering +
- Charles Harris
- Daniel Hrisca +
- Eric Wieser
- Joshua Leahy +
- Julian Taylor
- Michael Seifert
- Pauli Virtanen
- Ralf Gommers
- Roland Kaufmann
- Warren Weckesser
Checksums
MD5
010a6325ec8e7df2f305e716c871880a numpy-1.13.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
7774a1a5f93b45bfa7045b98eb102cca numpy-1.13.1-cp27-cp27m-manylinux1_i686.whl
7906018278f3471a9a166a3975523ddd numpy-1.13.1-cp27-cp27m-manylinux1_x86_64.whl
7ecd9304c319fc6b9ea481d6bf2e5051 numpy-1.13.1-cp27-cp27mu-manylinux1_i686.whl
de272621d41b7856e1580307be9d1fba numpy-1.13.1-cp27-cp27mu-manylinux1_x86_64.whl
21c4dc286991347f506c0e27475f9058 numpy-1.13.1-cp27-none-win32.whl
245e3ebe32cf60d9d16e7267aa4292fc numpy-1.13.1-cp27-none-win_amd64.whl
3eee3605dd61f02583264eb5697d8207 numpy-1.13.1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
4a9f08ad5f3073ecaeea939158eaf955 numpy-1.13.1-cp34-cp34m-manylinux1_i686.whl
c51520d0d3836c91cba18d1fa8cf299c numpy-1.13.1-cp34-cp34m-manylinux1_x86_64.whl
b1f13004ee992203d8c15940d60d0e7c numpy-1.13.1-cp34-none-win32.whl
062bf4ed9e0fd5af995a17360e7bdec9 numpy-1.13.1-cp34-none-win_amd64.whl
b14a4749abbab74c21ef0743f7426245 numpy-1.13.1-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
a5b6bffc5a0e4950748ab0969457a728 numpy-1.13.1-cp35-cp35m-manylinux1_i686.whl
4558a2357849d9ef7b80260a76b7c990 numpy-1.13.1-cp35-cp35m-manylinux1_x86_64.whl
dd062ef029279bd795653a768d50180d numpy-1.13.1-cp35-none-win32.whl
4df5bb3eb4787ff9850c1a5694922ab4 numpy-1.13.1-cp35-none-win_amd64.whl
449926c081bd27655d8bf76e03c5c75c numpy-1.13.1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
6ab8632d38c0313d9e063841a7e43edf numpy-1.13.1-cp36-cp36m-manylinux1_i686.whl
a3664260fc73c6c2645a00b22109a2b8 numpy-1.13.1-cp36-cp36m-manylinux1_x86_64.whl
0a5d74ebce74e2a557d7bc0183398ac1 numpy-1.13.1-cp36-none-win32.whl
ab789d91bc6e423084df7fc73e667270 numpy-1.13.1-cp36-none-win_amd64.whl
6d459e4a24f5035f720dda3c57716a92 numpy-1.13.1.tar.gz
2c3c0f4edf720c3a7b525dacc825b9ae numpy-1.13.1.zip
SHA256
91a4f5c6594a61b57b0ab6031a084fa3686b1e847cc2215983e444583594b529 numpy-1.13.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
ab6abc2083013dd86a8fcba2ba16bab00690cb81db62588781d656572809c9a9 numpy-1.13.1-cp27-cp27m-manylinux1_i686.whl
02e6279d95081086469e6ed83c708c4c48ed03a28ab87c71bea28af3b95fa56d numpy-1.13.1-cp27-cp27m-manylinux1_x86_64.whl
05a7a81397e1391ae34cc0d14764a31ab6f73dbd0abe0952b3550d3ad4df265d numpy-1.13.1-cp27-cp27mu-manylinux1_i686.whl
73fd54d9787f4f8747f823a7e2d0693da94c66b670ccf436e4bb488bbcd5ce8c numpy-1.13.1-cp27-cp27mu-manylinux1_x86_64.whl
4b7da62ba159bfc5fee6f54709b0708686ee15081f16dc5f81cda7f1e0e77941 numpy-1.13.1-cp27-none-win32.whl
1980c4bc1eb495624c8414f3763da83b91d37c3c69772ab6912e9a857a143cdb numpy-1.13.1-cp27-none-win_amd64.whl
436d47018c3cd2b9723ed3cd4ed4698ea7641449c71096781478ef6a20ae3bd0 numpy-1.13.1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
43722270fbfb07d91558985a3da37aa92a2d4e2d271182526959a5773f9fb12a numpy-1.13.1-cp34-cp34m-manylinux1_i686.whl
838e48df3703c8747f355cd6386e0680b906a2f7b2bbd304e8a2d531692484ce numpy-1.13.1-cp34-cp34m-manylinux1_x86_64.whl
1400ec59c7f6c4f9390cc3bc5e56a6cbae2c30b39024eef317a0b52fe9c174c6 numpy-1.13.1-cp34-none-win32.whl
ed6a909a78e29a4056e30f918a26b231e33edc77bd785bbceb461877baf9feb5 numpy-1.13.1-cp34-none-win_amd64.whl
c1833829526ce8f5177a3e07554b6c98c194072f66f018839ecd1ef2d15e6c4a numpy-1.13.1-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
a09a4707066fe9431c6b79a1be922bc126f4bc50502ae7e9f67d40917d0cc6d4 numpy-1.13.1-cp35-cp35m-manylinux1_i686.whl
9a8515002f143a5934f25ad2aacdfd1fcf57a7f5da6142c439eb8787ef65e8a6 numpy-1.13.1-cp35-cp35m-manylinux1_x86_64.whl
b49caeb170e54cc59863017a199667a51526bd906bcd5ee340fcf0e01bd7fa94 numpy-1.13.1-cp35-none-win32.whl
405c3dbb6a57415ec8576ff1c0248f332ac1c3be2e5eea04d498dad8431bf57b numpy-1.13.1-cp35-none-win_amd64.whl
42b3cf886701bb16f3bdf2ae6c39af67b464cdd67d5fc86619ef2a876a23de27 numpy-1.13.1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
94cb6ef9ffd15d7d904d0825ada642a51dc8890cdc06f1e4fb8e46cff79fe2ef numpy-1.13.1-cp36-cp36m-manylinux1_i686.whl
d910a24f536f926bd56fb30d6f17ae8b89a1406e105087a49e014e000b00e8db numpy-1.13.1-cp36-cp36m-manylinux1_x86_64.whl
b064211a4d86fc8009ef90c66d1443ba4a0c56d481659e085a190299569955e3 numpy-1.13.1-cp36-none-win32.whl
f4b4b2da8c1b4f7c212742d2be03aa9277d46fd7b309025d930ad554e5739932 numpy-1.13.1-cp36-none-win_amd64.whl
de020ec06f1e9ce1115a50161a38bf8d4c2525379900f9cb478cc613a1e7cd93 numpy-1.13.1.tar.gz
c9b0283776085cb2804efff73e9955ca279ba4edafd58d3ead70b61d209c4fbb numpy-1.13.1.zip
v1.13.0
==========================
NumPy 1.13.0 Release Notes
This release supports Python 2.7 and 3.4 - 3.6.
Highlights
- Operations like
a + b + c
will reuse temporaries on some platforms,
resulting in less memory use and faster execution. - Inplace operations check if inputs overlap outputs and create temporaries
to avoid problems. - New
__array_ufunc__
attribute provides improved ability for classes to
override default ufunc behavior. - New
np.block
function for creating blocked arrays.
New functions
- New
np.positive
ufunc. - New
np.divmod
ufunc provides more efficient divmod. - New
np.isnat
ufunc tests for NaT special values. - New
np.heaviside
ufunc computes the Heaviside function. - New
np.isin
function, improves onin1d
. - New
np.block
function for creating blocked arrays. - New
PyArray_MapIterArrayCopyIfOverlap
added to NumPy C-API.
See below for details.
Deprecations
- Calling
np.fix
,np.isposinf
, andnp.isneginf
withf(x, y=out)
is deprecated - the argument should be passed asf(x, out=out)
, which
matches other ufunc-like interfaces. - Use of the C-API
NPY_CHAR
type number deprecated since version 1.7 will
now raise deprecation warnings at runtime. Extensions built with older f2py
versions need to be recompiled to remove the warning. np.ma.argsort
,np.ma.minimum.reduce
, andnp.ma.maximum.reduce
should be called with an explicitaxis
argument when applied to arrays with
more than 2 dimensions, as the default value of this argument (None
) is
inconsistent with the rest of numpy (-1
,0
, and0
, respectively).np.ma.MaskedArray.mini
is deprecated, as it almost duplicates the
functionality ofnp.MaskedArray.min
. Exactly equivalent behaviour
can be obtained withnp.ma.minimum.reduce
.- The single-argument form of
np.ma.minimum
andnp.ma.maximum
is
deprecated.np.maximum
.np.ma.minimum(x)
should now be spelt
np.ma.minimum.reduce(x)
, which is consistent with how this would be done
withnp.minimum
. - Calling
ndarray.conjugate
on non-numeric dtypes is deprecated (it
should match the behavior ofnp.conjugate
, which throws an error). - Calling
expand_dims
when theaxis
keyword does not satisfy
-a.ndim - 1 <= axis <= a.ndim
, wherea
is the array being reshaped,
is deprecated.
Future Changes
- Assignment between structured arrays with different field names will change
in NumPy 1.14. Previously, fields in the dst would be set to the value of the
identically-named field in the src. In numpy 1.14 fields will instead be
assigned 'by position': The n-th field of the dst will be set to the n-th
field of the src array. Note that theFutureWarning
raised in NumPy 1.12
incorrectly reported this change as scheduled for NumPy 1.13 rather than
NumPy 1.14.
Build System Changes
numpy.distutils
now automatically determines C-file dependencies with
GCC compatible compilers.
Compatibility notes
Error type changes
numpy.hstack()
now throwsValueError
instead ofIndexError
when
input is empty.- Functions taking an axis argument, when that argument is out of range, now
thrownp.AxisError
instead of a mixture ofIndexError
and
ValueError
. For backwards compatibility,AxisError
subclasses both of
these.
Tuple object dtypes
Support has been removed for certain obscure dtypes that were unintentionally
allowed, of the form (old_dtype, new_dtype)
, where either of the dtypes
is or contains the object
dtype. As an exception, dtypes of the form
(object, [('name', object)])
are still supported due to evidence of
existing use.
DeprecationWarning to error
See Changes section for more detail.
partition
, TypeError when non-integer partition index is used.NpyIter_AdvancedNew
, ValueError whenoa_ndim == 0
andop_axes
is NULLnegative(bool_)
, TypeError when negative applied to booleans.subtract(bool_, bool_)
, TypeError when subtracting boolean from boolean.np.equal, np.not_equal
, object identity doesn't override failed comparison.np.equal, np.not_equal
, object identity doesn't override non-boolean comparison.- Deprecated boolean indexing behavior dropped. See Changes below for details.
- Deprecated
np.alterdot()
andnp.restoredot()
removed.
FutureWarning to changed behavior
See Changes section for more detail.
numpy.average
preserves subclassesarray == None
andarray != None
do element-wise comparison.np.equal, np.not_equal
, object identity doesn't override comparison result.
dtypes are now always true
Previously bool(dtype)
would fall back to the default python
implementation, which checked if len(dtype) > 0
. Since dtype
objects
implement __len__
as the number of record fields, bool
of scalar dtypes
would evaluate to False
, which was unintuitive. Now bool(dtype) == True
for all dtypes.
__getslice__
and __setslice__
are no longer needed in ndarray
subclasses
When subclassing np.ndarray in Python 2.7, it is no longer necessary to
implement __*slice__
on the derived class, as __*item__
will intercept
these calls correctly.
Any code that did implement these will work exactly as before. Code that
invokesndarray.__getslice__
(e.g. through super(...).__getslice__
) will
now issue a DeprecationWarning - .__getitem__(slice(start, end))
should be
used instead.
Indexing MaskedArrays/Constants with ...
(ellipsis) now returns MaskedArray
This behavior mirrors that of np.ndarray, and accounts for nested arrays in
MaskedArrays of object dtype, and ellipsis combined with other forms of
indexing.
C API changes
GUfuncs on empty arrays and NpyIter axis removal
It is now allowed to remove a zero-sized axis from NpyIter. Which may mean
that code removing axes from NpyIter has to add an additional check when
accessing the removed dimensions later on.
The largest followup change is that gufuncs are now allowed to have zero-sized
inner dimensions. This means that a gufunc now has to anticipate an empty inner
dimension, while this was never possible and an error raised instead.
For most gufuncs no change should be necessary. However, it is now possible
for gufuncs with a signature such as (..., N, M) -> (..., M)
to return
a valid result if N=0
without further wrapping code.
PyArray_MapIterArrayCopyIfOverlap
added to NumPy C-API
Similar to PyArray_MapIterArray
but with an additional copy_if_overlap
argument. If copy_if_overlap != 0
, checks if input has memory overlap with
any of the other arrays and make copies as appropriate to avoid problems if the
input is modified during the iteration. See the documentation for more complete
documentation.
New Features
__array_ufunc__
added
This is the renamed and redesigned __numpy_ufunc__
. Any class, ndarray
subclass or not, can define this method or set it to None
in order to
override the behavior of NumPy's ufuncs. This works quite similarly to Python's
__mul__
and other binary operation routines. See the documentation for a
more detailed description of the implementation and behavior of this new
option. The API is provisional, we do not yet guarantee backward compatibility
as modifications may be made pending feedback. See the NEP_ and
documentation_ for more details.
.. _NEP: https://github.com/numpy/numpy/blob/master/doc/neps/ufunc-overrides.rst
.. _documentation: https://github.com/charris/numpy/blob/master/doc/source/reference/arrays.classes.rst
New positive
ufunc
This ufunc corresponds to unary +
, but unlike +
on an ndarray it will raise
an error if array values do not support numeric operations.
New divmod
ufunc
This ufunc corresponds to the Python builtin divmod
, and is used to implement
divmod
when called on numpy arrays. np.divmod(x, y)
calculates a result
equivalent to (np.floor_divide(x, y), np.remainder(x, y))
but is
approximately twice as fast as calling the functions separately.
np.isnat
ufunc tests for NaT special datetime and timedelta values
The new ufunc np.isnat
finds the positions of special NaT values
within datetime and timedelta arrays. This is analogous to np.isnan
.
np.heaviside
ufunc computes the Heaviside function
The new function np.heaviside(x, h0)
(a ufunc) computes the Heaviside
function:
.. code::
{ 0 if x < 0,
heaviside(x, h0) = { h0 if x == 0,
{ 1 if x > 0.
np.block
function for creating blocked arrays
Add a new block
function to the current stacking functions vstack
,
hstack
, and stack
. This allows concatenation across multiple axes
simultaneously, with a similar syntax to array creation, but where elements
can themselves be arrays. For instance::
>>> A = np.eye(2) * 2
>>> B ...
v1.13.0rc2
==========================
NumPy 1.13.0 Release Notes
This release supports Python 2.7 and 3.4 - 3.6.
Highlights
- Operations like
a + b + c
will reuse temporaries on some platforms,
resulting in less memory use and faster execution. - Inplace operations check if inputs overlap outputs and create temporaries
to avoid problems. - New
__array_ufunc__
attribute provides improved ability for classes to
override default ufunc behavior. - New
np.block
function for creating blocked arrays.
New functions
- New
np.positive
ufunc. - New
np.divmod
ufunc provides more efficient divmod. - New
np.isnat
ufunc tests for NaT special values. - New
np.heaviside
ufunc computes the Heaviside function. - New
np.isin
function, improves onin1d
. - New
np.block
function for creating blocked arrays. - New
PyArray_MapIterArrayCopyIfOverlap
added to NumPy C-API.
See below for details.
Deprecations
- Calling
np.fix
,np.isposinf
, andnp.isneginf
withf(x, y=out)
is deprecated - the argument should be passed asf(x, out=out)
, which
matches other ufunc-like interfaces. - Use of the C-API
NPY_CHAR
type number deprecated since version 1.7 will
now raise deprecation warnings at runtime. Extensions built with older f2py
versions need to be recompiled to remove the warning. np.ma.argsort
,np.ma.minimum.reduce
, andnp.ma.maximum.reduce
should be called with an explicitaxis
argument when applied to arrays with
more than 2 dimensions, as the default value of this argument (None
) is
inconsistent with the rest of numpy (-1
,0
, and0
, respectively).np.ma.MaskedArray.mini
is deprecated, as it almost duplicates the
functionality ofnp.MaskedArray.min
. Exactly equivalent behaviour
can be obtained withnp.ma.minimum.reduce
.- The single-argument form of
np.ma.minimum
andnp.ma.maximum
is
deprecated.np.maximum
.np.ma.minimum(x)
should now be spelt
np.ma.minimum.reduce(x)
, which is consistent with how this would be done
withnp.minimum
. - Calling
ndarray.conjugate
on non-numeric dtypes is deprecated (it
should match the behavior ofnp.conjugate
, which throws an error). - Calling
expand_dims
when theaxis
keyword does not satisfy
-a.ndim - 1 <= axis <= a.ndim
, wherea
is the array being reshaped,
is deprecated.
Future Changes
- Assignment between structured arrays with different field names will change
in NumPy 1.14. Previously, fields in the dst would be set to the value of the
identically-named field in the src. In numpy 1.14 fields will instead be
assigned 'by position': The n-th field of the dst will be set to the n-th
field of the src array. Note that theFutureWarning
raised in NumPy 1.12
incorrectly reported this change as scheduled for NumPy 1.13 rather than
NumPy 1.14.
Build System Changes
numpy.distutils
now automatically determines C-file dependencies with
GCC compatible compilers.
Compatibility notes
Error type changes
numpy.hstack()
now throwsValueError
instead ofIndexError
when
input is empty.- Functions taking an axis argument, when that argument is out of range, now
thrownp.AxisError
instead of a mixture ofIndexError
and
ValueError
. For backwards compatibility,AxisError
subclasses both of
these.
Tuple object dtypes
Support has been removed for certain obscure dtypes that were unintentionally
allowed, of the form (old_dtype, new_dtype)
, where either of the dtypes
is or contains the object
dtype. As an exception, dtypes of the form
(object, [('name', object)])
are still supported due to evidence of
existing use.
DeprecationWarning to error
See Changes section for more detail.
partition
, TypeError when non-integer partition index is used.NpyIter_AdvancedNew
, ValueError whenoa_ndim == 0
andop_axes
is NULLnegative(bool_)
, TypeError when negative applied to booleans.subtract(bool_, bool_)
, TypeError when subtracting boolean from boolean.np.equal, np.not_equal
, object identity doesn't override failed comparison.np.equal, np.not_equal
, object identity doesn't override non-boolean comparison.- Deprecated boolean indexing behavior dropped. See Changes below for details.
- Deprecated
np.alterdot()
andnp.restoredot()
removed.
FutureWarning to changed behavior
See Changes section for more detail.
numpy.average
preserves subclassesarray == None
andarray != None
do element-wise comparison.np.equal, np.not_equal
, object identity doesn't override comparison result.
dtypes are now always true
Previously bool(dtype)
would fall back to the default python
implementation, which checked if len(dtype) > 0
. Since dtype
objects
implement __len__
as the number of record fields, bool
of scalar dtypes
would evaluate to False
, which was unintuitive. Now bool(dtype) == True
for all dtypes.
__getslice__
and __setslice__
are no longer needed in ndarray
subclasses
When subclassing np.ndarray in Python 2.7, it is no longer necessary to
implement __*slice__
on the derived class, as __*item__
will intercept
these calls correctly.
Any code that did implement these will work exactly as before. Code that
invokesndarray.__getslice__
(e.g. through super(...).__getslice__
) will
now issue a DeprecationWarning - .__getitem__(slice(start, end))
should be
used instead.
Indexing MaskedArrays/Constants with ...
(ellipsis) now returns MaskedArray
This behavior mirrors that of np.ndarray, and accounts for nested arrays in
MaskedArrays of object dtype, and ellipsis combined with other forms of
indexing.
C API changes
GUfuncs on empty arrays and NpyIter axis removal
It is now allowed to remove a zero-sized axis from NpyIter. Which may mean
that code removing axes from NpyIter has to add an additional check when
accessing the removed dimensions later on.
The largest followup change is that gufuncs are now allowed to have zero-sized
inner dimensions. This means that a gufunc now has to anticipate an empty inner
dimension, while this was never possible and an error raised instead.
For most gufuncs no change should be necessary. However, it is now possible
for gufuncs with a signature such as (..., N, M) -> (..., M)
to return
a valid result if N=0
without further wrapping code.
PyArray_MapIterArrayCopyIfOverlap
added to NumPy C-API
Similar to PyArray_MapIterArray
but with an additional copy_if_overlap
argument. If copy_if_overlap != 0
, checks if input has memory overlap with
any of the other arrays and make copies as appropriate to avoid problems if the
input is modified during the iteration. See the documentation for more complete
documentation.
New Features
__array_ufunc__
added
This is the renamed and redesigned __numpy_ufunc__
. Any class, ndarray
subclass or not, can define this method or set it to None
in order to
override the behavior of NumPy's ufuncs. This works quite similarly to Python's
__mul__
and other binary operation routines. See the documentation for a
more detailed description of the implementation and behavior of this new
option. The API is provisional, we do not yet guarantee backward compatibility
as modifications may be made pending feedback. See the NEP_ and
documentation_ for more details.
.. _NEP: https://github.com/numpy/numpy/blob/master/doc/neps/ufunc-overrides.rst
.. _documentation: https://github.com/charris/numpy/blob/master/doc/source/reference/arrays.classes.rst
New positive
ufunc
This ufunc corresponds to unary +
, but unlike +
on an ndarray it will raise
an error if array values do not support numeric operations.
New divmod
ufunc
This ufunc corresponds to the Python builtin divmod
, and is used to implement
divmod
when called on numpy arrays. np.divmod(x, y)
calculates a result
equivalent to (np.floor_divide(x, y), np.remainder(x, y))
but is
approximately twice as fast as calling the functions separately.
np.isnat
ufunc tests for NaT special datetime and timedelta values
The new ufunc np.isnat
finds the positions of special NaT values
within datetime and timedelta arrays. This is analogous to np.isnan
.
np.heaviside
ufunc computes the Heaviside function
The new function np.heaviside(x, h0)
(a ufunc) computes the Heaviside
function:
.. code::
{ 0 if x < 0,
heaviside(x, h0) = { h0 if x == 0,
{ 1 if x > 0.
np.block
function for creating blocked arrays
Add a new block
function to the current stacking functions vstack
,
hstack
, and stack
. This allows concatenation across multiple axes
simultaneously, with a similar syntax to array creation, but where elements
can themselves be arrays. For instance::
>>> A = np.eye(2) * 2
>>> B ...
v1.13.0rc1
==========================
NumPy 1.13.0 Release Notes
This release supports Python 2.7 and 3.4 - 3.6.
Highlights
- Operations like
a + b + c
will reuse temporaries on some platforms,
resulting in less memory use and faster execution. - Inplace operations check if inputs overlap outputs and create temporaries
to avoid problems. - New
__array_ufunc__
attribute provides improved ability for classes to
override default ufunc behavior. - New
np.block
function for creating blocked arrays.
New functions
- New
np.positive
ufunc. - New
np.divmod
ufunc provides more efficient divmod. - New
np.isnat
ufunc tests for NaT special values. - New
np.heaviside
ufunc computes the Heaviside function. - New
np.isin
function, improves onin1d
. - New
np.block
function for creating blocked arrays. - New
PyArray_MapIterArrayCopyIfOverlap
added to NumPy C-API.
See below for details.
Deprecations
- Calling
np.fix
,np.isposinf
, andnp.isneginf
withf(x, y=out)
is deprecated - the argument should be passed asf(x, out=out)
, which
matches other ufunc-like interfaces. - Use of the C-API
NPY_CHAR
type number deprecated since version 1.7 will
now raise deprecation warnings at runtime. Extensions built with older f2py
versions need to be recompiled to remove the warning. np.ma.argsort
,np.ma.minimum.reduce
, andnp.ma.maximum.reduce
should be called with an explicitaxis
argument when applied to arrays with
more than 2 dimensions, as the default value of this argument (None
) is
inconsistent with the rest of numpy (-1
,0
, and0
, respectively).np.ma.MaskedArray.mini
is deprecated, as it almost duplicates the
functionality ofnp.MaskedArray.min
. Exactly equivalent behaviour
can be obtained withnp.ma.minimum.reduce
.- The single-argument form of
np.ma.minimum
andnp.ma.maximum
is
deprecated.np.maximum
.np.ma.minimum(x)
should now be spelt
np.ma.minimum.reduce(x)
, which is consistent with how this would be done
withnp.minimum
. - Calling
ndarray.conjugate
on non-numeric dtypes is deprecated (it
should match the behavior ofnp.conjugate
, which throws an error).
Future Changes
- Assignment between structured arrays with different field names will change
in NumPy 1.14. Previously, fields in the dst would be set to the value of the
identically-named field in the src. In numpy 1.14 fields will instead be
assigned 'by position': The n-th field of the dst will be set to the n-th
field of the src array. Note that theFutureWarning
raised in NumPy 1.12
incorrectly reported this change as scheduled for NumPy 1.13 rather than
NumPy 1.14.
Build System Changes
numpy.distutils
now automatically determines C-file dependencies with
GCC compatible compilers.
Compatibility notes
Error type changes
numpy.hstack()
now throwsValueError
instead ofIndexError
when
input is empty.- Functions taking an axis argument, when that argument is out of range, now
thrownp.AxisError
instead of a mixture ofIndexError
and
ValueError
. For backwards compatibility,AxisError
subclasses both of
these.
Tuple object dtypes
Support has been removed for certain obscure dtypes that were unintentionally
allowed, of the form (old_dtype, new_dtype)
, where either of the dtypes
is or contains the object
dtype. As an exception, dtypes of the form
(object, [('name', object)])
are still supported due to evidence of
existing use.
DeprecationWarning to error
See Changes section for more detail.
partition
, TypeError when non-integer partition index is used.NpyIter_AdvancedNew
, ValueError whenoa_ndim == 0
andop_axes
is NULLnegative(bool_)
, TypeError when negative applied to booleans.subtract(bool_, bool_)
, TypeError when subtracting boolean from boolean.np.equal, np.not_equal
, object identity doesn't override failed comparison.np.equal, np.not_equal
, object identity doesn't override non-boolean comparison.- Deprecated boolean indexing behavior dropped. See Changes below for details.
- Deprecated
np.alterdot()
andnp.restoredot()
removed.
FutureWarning to changed behavior
See Changes section for more detail.
numpy.average
preserves subclassesarray == None
andarray != None
do element-wise comparison.np.equal, np.not_equal
, object identity doesn't override comparison result.
dtypes are now always true
Previously bool(dtype)
would fall back to the default python
implementation, which checked if len(dtype) > 0
. Since dtype
objects
implement __len__
as the number of record fields, bool
of scalar dtypes
would evaluate to False
, which was unintuitive. Now bool(dtype) == True
for all dtypes.
__getslice__
and __setslice__
are no longer needed in ndarray
subclasses
When subclassing np.ndarray in Python 2.7, it is no longer necessary to
implement __*slice__
on the derived class, as __*item__
will intercept
these calls correctly.
Any code that did implement these will work exactly as before. Code that
invokesndarray.__getslice__
(e.g. through super(...).__getslice__
) will
now issue a DeprecationWarning - .__getitem__(slice(start, end))
should be
used instead.
C API changes
GUfuncs on empty arrays and NpyIter axis removal
It is now allowed to remove a zero-sized axis from NpyIter. Which may mean
that code removing axes from NpyIter has to add an additional check when
accessing the removed dimensions later on.
The largest followup change is that gufuncs are now allowed to have zero-sized
inner dimensions. This means that a gufunc now has to anticipate an empty inner
dimension, while this was never possible and an error raised instead.
For most gufuncs no change should be necessary. However, it is now possible
for gufuncs with a signature such as (..., N, M) -> (..., M)
to return
a valid result if N=0
without further wrapping code.
PyArray_MapIterArrayCopyIfOverlap
added to NumPy C-API
Similar to PyArray_MapIterArray
but with an additional copy_if_overlap
argument. If copy_if_overlap != 0
, checks if input has memory overlap with
any of the other arrays and make copies as appropriate to avoid problems if the
input is modified during the iteration. See the documentation for more complete
documentation.
New Features
__array_ufunc__
added
This is the renamed and redesigned __numpy_ufunc__
. Any class, ndarray
subclass or not, can define this method or set it to None
in order to
override the behavior of NumPy's ufuncs. This works quite similarly to Python's
__mul__
and other binary operation routines. See the documentation for a
more detailed description of the implementation and behavior of this new
option. The API is provisional, we do not yet guarantee backward compatibility
as modifications may be made pending feedback. See the NEP_ and
documentation_ for more details.
.. _NEP: https://github.com/numpy/numpy/blob/master/doc/neps/ufunc-overrides.rst
.. _documentation: https://github.com/charris/numpy/blob/master/doc/source/reference/arrays.classes.rst
New positive
ufunc
This ufunc corresponds to unary +
, but unlike +
on an ndarray it will raise
an error if array values do not support numeric operations.
New divmod
ufunc
This ufunc corresponds to the Python builtin divmod
, and is used to implement
divmod
when called on numpy arrays. np.divmod(x, y)
calculates a result
equivalent to (np.floor_divide(x, y), np.remainder(x, y))
but is
approximately twice as fast as calling the functions separately.
np.isnat
ufunc tests for NaT special datetime and timedelta values
The new ufunc np.isnat
finds the positions of special NaT values
within datetime and timedelta arrays. This is analogous to np.isnan
.
np.heaviside
ufunc computes the Heaviside function
The new function np.heaviside(x, h0)
(a ufunc) computes the Heaviside
function:
.. code::
{ 0 if x < 0,
heaviside(x, h0) = { h0 if x == 0,
{ 1 if x > 0.
np.block
function for creating blocked arrays
Add a new block
function to the current stacking functions vstack
,
hstack
, and stack
. This allows concatenation across multiple axes
simultaneously, with a similar syntax to array creation, but where elements
can themselves be arrays. For instance::
>>> A = np.eye(2) * 2
>>> B = np.eye(3) * 3
>>> np.block([
... [A, np.zeros((2, 3))],
... [np.ones((3, 2)), B ]
... ])
array([[ 2., 0., 0., 0., 0.],
[ 0., 2., 0., 0., 0.],
[ 1., 1., 3., 0., 0.],
[ 1., 1., 0., 3., 0.],
[ 1., 1., 0., 0., 3.]])
While primarily useful for block matrices, this works for arbitrary dimensions
of arrays.
It is similar to Matlab's square bracket notation ...
v1.12.1
==========================
NumPy 1.12.1 Release Notes
NumPy 1.12.1 supports Python 2.7 and 3.4 - 3.6 and fixes bugs and regressions
found in NumPy 1.12.0. In particular, the regression in f2py constant parsing
is fixed. Wheels for Linux, Windows, and OSX can be found on pypi,
Contributors
A total of 10 people contributed to this release. People with a "+" by their
names contributed a patch for the first time.
- Charles Harris
- Eric Wieser
- Greg Young
- Joerg Behrmann +
- John Kirkham
- Julian Taylor
- Marten van Kerkwijk
- Matthew Brett
- Shota Kawabuchi
- Jean Utke +
Fixes Backported
- #8483: BUG: Fix wrong future nat warning and equiv type logic error...
- #8489: BUG: Fix wrong masked median for some special cases
- #8490: DOC: Place np.average in inline code
- #8491: TST: Work around isfinite inconsistency on i386
- #8494: BUG: Guard against replacing constants without
'_'
spec in f2py. - #8524: BUG: Fix mean for float 16 non-array inputs for 1.12
- #8571: BUG: Fix calling python api with error set and minor leaks for...
- #8602: BUG: Make iscomplexobj compatible with custom dtypes again
- #8618: BUG: Fix undefined behaviour induced by bad
__array_wrap__
- #8648: BUG: Fix MaskedArray.
__setitem__
- #8659: BUG: PPC64el machines are POWER for Fortran in f2py
- #8665: BUG: Look up methods on MaskedArray in
_frommethod
- #8674: BUG: Remove extra digit in binary_repr at limit
- #8704: BUG: Fix deepcopy regression for empty arrays.
- #8707: BUG: Fix ma.median for empty ndarrays
Checksums
MD5
ca6c4a370f76bb461f7c3e254c45db02 numpy-1.12.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
71c887adb4cf6a374ff4a83115c8860b numpy-1.12.1-cp27-cp27m-manylinux1_i686.whl
614755c8ee8408b83bd1ba837b6034b2 numpy-1.12.1-cp27-cp27m-manylinux1_x86_64.whl
3ec80a7e027146d4fad10f85426af256 numpy-1.12.1-cp27-cp27mu-manylinux1_i686.whl
471f740f61f7fba1a1a1e526bf710c49 numpy-1.12.1-cp27-cp27mu-manylinux1_x86_64.whl
906d8d8e1cb6a5056e0405d5b54d6440 numpy-1.12.1-cp27-none-win32.whl
7cd640cdcb6b80fa501d377bf883ec61 numpy-1.12.1-cp27-none-win_amd64.whl
2d89d21806408befdc20b5c9e8bfd354 numpy-1.12.1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
e5e9c27564bd41d88df001c2cc0ace7b numpy-1.12.1-cp34-cp34m-manylinux1_i686.whl
6288d4e9cfea859e03dc82879539d029 numpy-1.12.1-cp34-cp34m-manylinux1_x86_64.whl
7e08d4f57dc51c7916042670753c0462 numpy-1.12.1-cp34-none-win32.whl
cac2b18bde8a76537762e8acfb25c89d numpy-1.12.1-cp34-none-win_amd64.whl
ebd51c3549ee44a57af0f35a9f5b2b02 numpy-1.12.1-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
5bb0426593f74b922f1e549cde412f4b numpy-1.12.1-cp35-cp35m-manylinux1_i686.whl
c372561ab420e6e18eb8f2e7da24f1fd numpy-1.12.1-cp35-cp35m-manylinux1_x86_64.whl
9d2d3a0d9af306c51255ced96244213f numpy-1.12.1-cp35-none-win32.whl
4b32dcd1c59804f53cb9473d99673ea5 numpy-1.12.1-cp35-none-win_amd64.whl
a1d17430e3688e962feac3ec0d2f12c2 numpy-1.12.1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
c1f1c64b9d421c8715e476ae8a9d274e numpy-1.12.1-cp36-cp36m-manylinux1_i686.whl
fbebdc68b7698e00c07bf4ddae0fb717 numpy-1.12.1-cp36-cp36m-manylinux1_x86_64.whl
3e3110a79b3ce9feb8af31aaf3b47003 numpy-1.12.1-cp36-none-win32.whl
0c753fec7a10e3778215eb9f7c6f43f4 numpy-1.12.1-cp36-none-win_amd64.whl
2abe6efb8ea0ac1716d1fc5fa90cbacf numpy-1.12.1.tar.gz
c75b072a984028ac746a6a332c209a91 numpy-1.12.1.zip
SHA256
3b21dc40fa1e2450dee8cf54991b0f95c415ac508d5db1227338efcf03c162cd numpy-1.12.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
405ce136edb18c6f1f8c5acc75d7d8fbb875cc8b5015562251b93435099233d3 numpy-1.12.1-cp27-cp27m-manylinux1_i686.whl
ca917155b35b3bcc68ef1ad82570a29414f5088495ea8f68c65b071c50e64340 numpy-1.12.1-cp27-cp27m-manylinux1_x86_64.whl
7e9015bc5de54c8bd73ca750ccedfda25d34a25a767caf802740d35a692ec3ab numpy-1.12.1-cp27-cp27mu-manylinux1_i686.whl
cd7892f7d644d1b4ed2ead254d4851616c07ecf82618e3203e2a81747ffb6069 numpy-1.12.1-cp27-cp27mu-manylinux1_x86_64.whl
56e68de63ae738f40669b6a5f0601f9453940a0470a1e9bea16448e5b53f5f28 numpy-1.12.1-cp27-none-win32.whl
95e52d1077abeead6d205c1fc644f075228813859bb625960c1ae1248c4189ba numpy-1.12.1-cp27-none-win_amd64.whl
bcbce5ef18dc826ef67756a0d3669baca815c8d44b26867c6865f714a23d9262 numpy-1.12.1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
d8dbd7e35e4819e059a044c7545d5602937d6b666dbd9b6eb8ff40037ab0980c numpy-1.12.1-cp34-cp34m-manylinux1_i686.whl
4eac5f2f624c5e7eecbdb51395ff39a099c48cab607a158f16f288c6fe39a2b3 numpy-1.12.1-cp34-cp34m-manylinux1_x86_64.whl
9cd16915a815c2f04633d14e7640083c1b72e82b325439c91370adfd376c9975 numpy-1.12.1-cp34-none-win32.whl
4c64d9c389827f310c7f4e7887b741c34c6b2c337ff63a12f66ef0197fdf5366 numpy-1.12.1-cp34-none-win_amd64.whl
9ce673bb7b6240b94b60b52186f5c0825f4b31e8191c8bc7412a7d0348fca2cd numpy-1.12.1-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
130105bfc0b03245115da67b441c48597bf1ed7f5385f8388ce4f75cdf2f91d2 numpy-1.12.1-cp35-cp35m-manylinux1_i686.whl
92dce120e385767cbe433719b5e3fdb1ac81907140d3984b3187208f79aff19f numpy-1.12.1-cp35-cp35m-manylinux1_x86_64.whl
e97cecd783e8e7e70d18a42f6df7f18be14cbcc82fb9b837b03d072d1401ae53 numpy-1.12.1-cp35-none-win32.whl
818d5a1d5752d09929ce1ba1735366d5acc769a1839386dc91f3ac30cf9faf19 numpy-1.12.1-cp35-none-win_amd64.whl
43ccfed0092def52b924e004780517c762f8fce3ececbd3f8e2580ac0538bb5e numpy-1.12.1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
5cb6341fc885b101978328d3c8d51a069a97a00699a30891106ef7dda56a0d30 numpy-1.12.1-cp36-cp36m-manylinux1_i686.whl
5dd60892710df0ef654bbf4d1e3cb53ac79845e55a96e4a26dd47218e06d819a numpy-1.12.1-cp36-cp36m-manylinux1_x86_64.whl
727d6373355b00b96d9320254a676b878d6cd43ae409186bec27eec3e5e4e6e7 numpy-1.12.1-cp36-none-win32.whl
47b4c4da2fe0618b65fd70987a414fdc24c09e1ffdff77f7147a3c6627b07596 numpy-1.12.1-cp36-none-win_amd64.whl
d56d7fff81e844a407afa0503080c814e5d87678e338a73b8d8f98137713cfa9 numpy-1.12.1.tar.gz
a65266a4ad6ec8936a1bc85ce51f8600634a31a258b722c9274a80ff189d9542 numpy-1.12.1.zip
v1.12.1rc1
==========================
NumPy 1.12.1 Release Notes
NumPy 1.12.1 supports Python 2.7 and 3.4 - 3.6 and fixes bugs and regressions
found in NumPy 1.12.0. In particular, the regression in f2py constant parsing
is fixed. Wheels for Linux, Windows, and OSX can be found on pypi,
Contributors
A total of 10 people contributed to this release. People with a "+" by their
names contributed a patch for the first time.
- Charles Harris
- Eric Wieser
- Greg Young
- Joerg Behrmann +
- John Kirkham
- Julian Taylor
- Marten van Kerkwijk
- Matthew Brett
- Shota Kawabuchi
- Jean Utke +
Fixes Backported
- #8483: BUG: Fix wrong future nat warning and equiv type logic error...
- #8489: BUG: Fix wrong masked median for some special cases
- #8490: DOC: Place np.average in inline code
- #8491: TST: Work around isfinite inconsistency on i386
- #8494: BUG: Guard against replacing constants without
'_'
spec in f2py. - #8524: BUG: Fix mean for float 16 non-array inputs for 1.12
- #8571: BUG: Fix calling python api with error set and minor leaks for...
- #8602: BUG: Make iscomplexobj compatible with custom dtypes again
- #8618: BUG: Fix undefined behaviour induced by bad
__array_wrap__
- #8648: BUG: Fix
MaskedArray.__setitem__
- #8659: BUG: PPC64el machines are POWER for Fortran in f2py
- #8665: BUG: Look up methods on MaskedArray in
_frommethod
- #8674: BUG: Remove extra digit in
binary_repr
at limit - #8704: BUG: Fix deepcopy regression for empty arrays.
- #8707: BUG: Fix ma.median for empty ndarrays
Checksums
MD5
6f9da159637b542d847d43e56b3c04e1 numpy-1.12.1rc1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
2008f7244c850700d57e55316b9a74a3 numpy-1.12.1rc1-cp27-cp27m-manylinux1_i686.whl
d2d1a41a75e6fe7ffb8a648bf4f37306 numpy-1.12.1rc1-cp27-cp27m-manylinux1_x86_64.whl
68965b257291ae47c14aa2308aa873c6 numpy-1.12.1rc1-cp27-cp27mu-manylinux1_i686.whl
c9a592fc298ef7d6a788c2936e56e941 numpy-1.12.1rc1-cp27-cp27mu-manylinux1_x86_64.whl
9f788341df108abaf5a73642fb227a3a numpy-1.12.1rc1-cp27-none-win32.whl
470850b934b3e1bbffb983007e4002a9 numpy-1.12.1rc1-cp27-none-win_amd64.whl
a1ca4a95536fa7aa552de94721b4e212 numpy-1.12.1rc1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
ae62f3a079daf3e480c9b82d2baf9250 numpy-1.12.1rc1-cp34-cp34m-manylinux1_i686.whl
fc6dfaec9735cfd61ad5271c2f8f7c4d numpy-1.12.1rc1-cp34-cp34m-manylinux1_x86_64.whl
6a2c6058ae104df1298d57695f5e4a01 numpy-1.12.1rc1-cp34-none-win32.whl
67cc902f361323bba7f60cf236d72fc7 numpy-1.12.1rc1-cp34-none-win_amd64.whl
4bcb3d5b7946e828402c4d0922493e2c numpy-1.12.1rc1-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
48961a54ae03fb68f1269d66d7ba006a numpy-1.12.1rc1-cp35-cp35m-manylinux1_i686.whl
cf11aa3abfed14578986b6cbdbfd09c3 numpy-1.12.1rc1-cp35-cp35m-manylinux1_x86_64.whl
ea49287c2e2fcecd34b9ef68f6519380 numpy-1.12.1rc1-cp35-none-win32.whl
cfc541c007f2dc5694f2ab530cefff25 numpy-1.12.1rc1-cp35-none-win_amd64.whl
24f835878000b1bbf54045eda1cf32ec numpy-1.12.1rc1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
d1825676d2590a828c1589bc89a05ddc numpy-1.12.1rc1-cp36-cp36m-manylinux1_i686.whl
296335a1576f38d6b0c59b493a0d7ba8 numpy-1.12.1rc1-cp36-cp36m-manylinux1_x86_64.whl
782ee95bc89bcc1966034c84c8b217b4 numpy-1.12.1rc1-cp36-none-win32.whl
c140f50a4a560dd18b2dbde287925964 numpy-1.12.1rc1-cp36-none-win_amd64.whl
23e08c029b3d44fe92da20fc2566bf7f numpy-1.12.1rc1.tar.gz
091bc6601fe74d0e5a00c22c3d97d9bc numpy-1.12.1rc1.zip
SHA256
f99955e69570d37fd457127b995506e4148ac5c4b523e31a61bf2295398532d8 numpy-1.12.1rc1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
03f6a31c62db7b5f4eb31be4d74b3ebad507da8cbe574ec6378680548681446b numpy-1.12.1rc1-cp27-cp27m-manylinux1_i686.whl
aa260f0290992d13c51121282de6e25cbc9b78344c99265193aae7f62b330bd8 numpy-1.12.1rc1-cp27-cp27m-manylinux1_x86_64.whl
3952e8e3b6cdf99d172c9f2399ecf49d0b0c3ca43ff30c067a53c80b1ae3feeb numpy-1.12.1rc1-cp27-cp27mu-manylinux1_i686.whl
866ab7c8ecd14458efb486f1866f1551430ca04a04b0d7c5e79c8b20bb0bea84 numpy-1.12.1rc1-cp27-cp27mu-manylinux1_x86_64.whl
85612e2923ecf3a14e99bd44f46ab73a7bbb2374d3ff279c84de8336849ed49e numpy-1.12.1rc1-cp27-none-win32.whl
e7637f111588f46b3b2962835baa06699893fb67867f55c58f6169fd5158a504 numpy-1.12.1rc1-cp27-none-win_amd64.whl
990848d22127cd30bd13609e7a6f2a593069d8219d24e5d40cc9c4f8e8d96f36 numpy-1.12.1rc1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
0da5dd9fa119d2e18d0a868cf79ae8a8ac09f20a5825d2dddc0d76b2aff2d47a numpy-1.12.1rc1-cp34-cp34m-manylinux1_i686.whl
7975dd70ef1527d4a2059650e4802a3f2087edd62f22a3e10fcc636e53914d85 numpy-1.12.1rc1-cp34-cp34m-manylinux1_x86_64.whl
4844b346d033eb4e6aaeffce368b23fc7a63fe25a4dba989f96519ffa63334e2 numpy-1.12.1rc1-cp34-none-win32.whl
a9021bccaea36190ef87a6de024c10f46198a172e8805c97f0841a3f50ad8f27 numpy-1.12.1rc1-cp34-none-win_amd64.whl
818e70d06a9d7ad24d9e20277e739203665bbbc00309f942f737ae97c727c5cb numpy-1.12.1rc1-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
e29f6b34aa1ba296a2e3ee50e53ee50773a2cf63b8e74670b41c86276c5845a1 numpy-1.12.1rc1-cp35-cp35m-manylinux1_i686.whl
263d83c480732753162110cc7d29b7dbbd6039042ba789a01feb6ddf82845171 numpy-1.12.1rc1-cp35-cp35m-manylinux1_x86_64.whl
a439c27f9e726d4e2da38a3caaa5bcafd6460a74f614f3c66c461935774fccae numpy-1.12.1rc1-cp35-none-win32.whl
9cea6070ff563a03236bbda56424093e1b6bfec7a0e719fcbb06370e166366f1 numpy-1.12.1rc1-cp35-none-win_amd64.whl
9b746a5a767025e520476fb3ffe923cc565953fa0006cc5ce83daa5ac4fa8eb6 numpy-1.12.1rc1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
f89fb559c21b51f28f56eca900011adef1ed2478d340641b78d81b00ab048ae0 numpy-1.12.1rc1-cp36-cp36m-manylinux1_i686.whl
14754935eba11505c2b92e02f334460c55414c107c6f45ec0ef45b072c2759c8 numpy-1.12.1rc1-cp36-cp36m-manylinux1_x86_64.whl
73a6407e6a46bf022bcd0c810865367623e28ce374dfd34cb777a220a0ca9149 numpy-1.12.1rc1-cp36-none-win32.whl
ace43661d923540bec2e98590d4d108168beebec32c51bf6e84d13b5367f1136 numpy-1.12.1rc1-cp36-none-win_amd64.whl
63bfae3adb227f38d4ce13aa55dad0eaf50e997394849021b1bf070707a6ab88 numpy-1.12.1rc1.tar.gz
eeaffa7be017c7f3bc8f88b6c7d7f5b3388c18a792b4f87a447a988fde883d30 numpy-1.12.1rc1.zip
v1.12.0
NumPy 1.12.0 Release Notes
This release supports Python 2.7 and 3.4 - 3.6.
Highlights
The NumPy 1.12.0 release contains a large number of fixes and improvements, but
few that stand out above all others. That makes picking out the highlights
somewhat arbitrary but the following may be of particular interest or indicate
areas likely to have future consequences.
- Order of operations in
np.einsum
can now be optimized for large speed improvements. - New
signature
argument tonp.vectorize
for vectorizing with core dimensions. - The
keepdims
argument was added to many functions. - New context manager for testing warnings
- Support for BLIS in numpy.distutils
- Much improved support for PyPy (not yet finished)
Dropped Support
- Support for Python 2.6, 3.2, and 3.3 has been dropped.
Added Support
- Support for PyPy 2.7 v5.6.0 has been added. While not complete (nditer
updateifcopy
is not supported yet), this is a milestone for PyPy's
C-API compatibility layer.
Build System Changes
- Library order is preserved, instead of being reordered to match that of
the directories.
Deprecations
Assignment of ndarray object's data
attribute
Assigning the 'data' attribute is an inherently unsafe operation as pointed
out in gh-7083. Such a capability will be removed in the future.
Unsafe int casting of the num attribute in linspace
np.linspace
now raises DeprecationWarning when num cannot be safely
interpreted as an integer.
Insufficient bit width parameter to binary_repr
If a 'width' parameter is passed into binary_repr
that is insufficient to
represent the number in base 2 (positive) or 2's complement (negative) form,
the function used to silently ignore the parameter and return a representation
using the minimal number of bits needed for the form in question. Such behavior
is now considered unsafe from a user perspective and will raise an error in the
future.
Future Changes
- In 1.13 NAT will always compare False except for
NAT != NAT
,
which will be True. In short, NAT will behave like NaN - In 1.13 np.average will preserve subclasses, to match the behavior of most
other numpy functions such as np.mean. In particular, this means calls which
returned a scalar may return a 0-d subclass object instead.
Multiple-field manipulation of structured arrays
In 1.13 the behavior of structured arrays involving multiple fields will change
in two ways:
First, indexing a structured array with multiple fields (eg,
arr[['f1', 'f3']]
) will return a view into the original array in 1.13,
instead of a copy. Note the returned view will have extra padding bytes
corresponding to intervening fields in the original array, unlike the copy in
1.12, which will affect code such as arr[['f1', 'f3']].view(newdtype)
.
Second, for numpy versions 1.6 to 1.12 assignment between structured arrays
occurs "by field name": Fields in the destination array are set to the
identically-named field in the source array or to 0 if the source does not have
a field::
>>> a = np.array([(1,2),(3,4)], dtype=[('x', 'i4'), ('y', 'i4')])
>>> b = np.ones(2, dtype=[('z', 'i4'), ('y', 'i4'), ('x', 'i4')])
>>> b[:] = a
>>> b
array([(0, 2, 1), (0, 4, 3)],
dtype=[('z', '<i4'), ('y', '<i4'), ('x', '<i4')])
In 1.13 assignment will instead occur "by position": The Nth field of the
destination will be set to the Nth field of the source regardless of field
name. The old behavior can be obtained by using indexing to reorder the fields
before
assignment, e.g., b[['x', 'y']] = a[['y', 'x']]
.
Compatibility notes
DeprecationWarning to error
- Indexing with floats raises
IndexError
,
e.g., a[0, 0.0]. - Indexing with non-integer array_like raises
IndexError
,
e.g.,a['1', '2']
- Indexing with multiple ellipsis raises
IndexError
,
e.g.,a[..., ...]
. - Non-integers used as index values raise
TypeError
,
e.g., inreshape
,take
, and specifying reduce axis.
FutureWarning to changed behavior
np.full
now returns an array of the fill-value's dtype if no dtype is
given, instead of defaulting to float.- np.average will emit a warning if the argument is a subclass of ndarray,
as the subclass will be preserved starting in 1.13. (see Future Changes)
power
and **
raise errors for integer to negative integer powers
The previous behavior depended on whether numpy scalar integers or numpy
integer arrays were involved.
For arrays
- Zero to negative integer powers returned least integral value.
- Both 1, -1 to negative integer powers returned correct values.
- The remaining integers returned zero when raised to negative integer powers.
For scalars
- Zero to negative integer powers returned least integral value.
- Both 1, -1 to negative integer powers returned correct values.
- The remaining integers sometimes returned zero, sometimes the
correct float depending on the integer type combination.
All of these cases now raise a ValueError
except for those integer
combinations whose common type is float, for instance uint64 and int8. It was
felt that a simple rule was the best way to go rather than have special
exceptions for the integer units. If you need negative powers, use an inexact
type.
Relaxed stride checking is the default
This will have some impact on code that assumed that F_CONTIGUOUS
and
C_CONTIGUOUS
were mutually exclusive and could be set to determine the
default order for arrays that are now both.
The np.percentile
'midpoint' interpolation method fixed for exact indices
The 'midpoint' interpolator now gives the same result as 'lower' and 'higher' when
the two coincide. Previous behavior of 'lower' + 0.5 is fixed.
keepdims
kwarg is passed through to user-class methods
numpy functions that take a keepdims
kwarg now pass the value
through to the corresponding methods on ndarray sub-classes. Previously the
keepdims
keyword would be silently dropped. These functions now have
the following behavior:
- If user does not provide
keepdims
, no keyword is passed to the underlying
method. - Any user-provided value of
keepdims
is passed through as a keyword
argument to the method.
This will raise in the case where the method does not support a
keepdims
kwarg and the user explicitly passes in keepdims
.
The following functions are changed: sum
, product
,
sometrue
, alltrue
, any
, all
, amax
, amin
,
prod
, mean
, std
, var
, nanmin
, nanmax
,
nansum
, nanprod
, nanmean
, nanmedian
, nanvar
,
nanstd
bitwise_and
identity changed
The previous identity was 1, it is now -1. See entry in Improvements
_ for
more explanation.
ma.median warns and returns nan when unmasked invalid values are encountered
Similar to unmasked median the masked median ma.median
now emits a Runtime
warning and returns NaN
in slices where an unmasked NaN
is present.
Greater consistancy in assert_almost_equal
The precision check for scalars has been changed to match that for arrays. It
is now::
abs(actual - desired) < 1.5 * 10**(-decimal)
Note that this is looser than previously documented, but agrees with the
previous implementation used in assert_array_almost_equal
. Due to the
change in implementation some very delicate tests may fail that did not
fail before.
NoseTester
behaviour of warnings during testing
When raise_warnings="develop"
is given, all uncaught warnings will now
be considered a test failure. Previously only selected ones were raised.
Warnings which are not caught or raised (mostly when in release mode)
will be shown once during the test cycle similar to the default python
settings.
assert_warns
and deprecated
decorator more specific
The assert_warns
function and context manager are now more specific
to the given warning category. This increased specificity leads to them
being handled according to the outer warning settings. This means that
no warning may be raised in cases where a wrong category warning is given
and ignored outside the context. Alternatively the increased specificity
may mean that warnings that were incorrectly ignored will now be shown
or raised. See also the new suppress_warnings
context manager.
The same is true for the deprecated
decorator.
C API
No changes.
New Features
Writeable keyword argument for as_strided
np.lib.stride_tricks.as_strided
now has a writeable
keyword argument. It can be set to False when no write operation
to the returned array is expected to avoid accidental
unpredictable writes.
axes
keyword argument for rot90
The axes
keyword argument in rot90
determines the plane in which the
array is rotated. It defaults to axes=(0,1)
as in the originial function.
Generalized flip
flipud
and fliplr
reverse the elements of an array along axis=0 and
axis=1 respectively. The newly added flip
function reverses the elements of
an array along any given axis.
np.count_nonzero
now has anaxis
parameter, allowing
non-zero counts to be generated on more than just a flattened
array object.
BLIS support in numpy.distutils
Building against the BLAS implementation provided by the BLIS library is now
supported. See the [blis]
section in site.cfg.example
(in the root of
the numpy repo or source distribution).
Hook in numpy/__init__.py
to run distribution-specific checks
Binary distributions of numpy may need to run specific hardware checks or load
specific libraries during numpy initialization. For example, if we are
distributing numpy with a BLAS library that requires SSE2 instructions, we
would like to check the machine on which numpy is running does have SSE2 in
order to give an informative error.
Add a hook in numpy/__init__.py
to import a numpy/_distributor_init.py
file that will remain empty (bar a docstring) in the standard numpy source,
but that can be overwritten by people making binary distributions of numpy.
New nanfunctions nancumsum
and `n...
v1.12.0rc2
NumPy 1.12.0 Release Notes
This release supports Python 2.7 and 3.4 - 3.6.
Highlights
The NumPy 1.12.0 release contains a large number of fixes and improvements, but
few that stand out above all others. That makes picking out the highlights
somewhat arbitrary but the following may be of particular interest or indicate
areas likely to have future consequences.
- Order of operations in
np.einsum
can now be optimized for large speed improvements. - New
signature
argument tonp.vectorize
for vectorizing with core dimensions. - The
keepdims
argument was added to many functions. - New context manager for testing warnings
- Support for BLIS in numpy.distutils
- Much improved support for PyPy (not yet finished)
Dropped Support
- Support for Python 2.6, 3.2, and 3.3 has been dropped.
Added Support
- Support for PyPy 2.7 v5.6.0 has been added. While not complete (nditer
updateifcopy
is not supported yet), this is a milestone for PyPy's
C-API compatibility layer.
Build System Changes
- Library order is preserved, instead of being reordered to match that of
the directories.
Deprecations
Assignment of ndarray object's data
attribute
Assigning the 'data' attribute is an inherently unsafe operation as pointed
out in gh-7083. Such a capability will be removed in the future.
Unsafe int casting of the num attribute in linspace
np.linspace
now raises DeprecationWarning when num cannot be safely
interpreted as an integer.
Insufficient bit width parameter to binary_repr
If a 'width' parameter is passed into binary_repr
that is insufficient to
represent the number in base 2 (positive) or 2's complement (negative) form,
the function used to silently ignore the parameter and return a representation
using the minimal number of bits needed for the form in question. Such behavior
is now considered unsafe from a user perspective and will raise an error in the
future.
Future Changes
- In 1.13 NAT will always compare False except for
NAT != NAT
,
which will be True. In short, NAT will behave like NaN - In 1.13 np.average will preserve subclasses, to match the behavior of most
other numpy functions such as np.mean. In particular, this means calls which
returned a scalar may return a 0-d subclass object instead.
Multiple-field manipulation of structured arrays
In 1.13 the behavior of structured arrays involving multiple fields will change
in two ways:
First, indexing a structured array with multiple fields (eg,
arr[['f1', 'f3']]
) will return a view into the original array in 1.13,
instead of a copy. Note the returned view will have extra padding bytes
corresponding to intervening fields in the original array, unlike the copy in
1.12, which will affect code such as arr[['f1', 'f3']].view(newdtype)
.
Second, for numpy versions 1.6 to 1.12 assignment between structured arrays
occurs "by field name": Fields in the destination array are set to the
identically-named field in the source array or to 0 if the source does not have
a field::
>>> a = np.array([(1,2),(3,4)], dtype=[('x', 'i4'), ('y', 'i4')])
>>> b = np.ones(2, dtype=[('z', 'i4'), ('y', 'i4'), ('x', 'i4')])
>>> b[:] = a
>>> b
array([(0, 2, 1), (0, 4, 3)],
dtype=[('z', '<i4'), ('y', '<i4'), ('x', '<i4')])
In 1.13 assignment will instead occur "by position": The Nth field of the
destination will be set to the Nth field of the source regardless of field
name. The old behavior can be obtained by using indexing to reorder the fields
before
assignment, e.g., b[['x', 'y']] = a[['y', 'x']]
.
Compatibility notes
DeprecationWarning to error
- Indexing with floats raises
IndexError
,
e.g., a[0, 0.0]. - Indexing with non-integer array_like raises
IndexError
,
e.g.,a['1', '2']
- Indexing with multiple ellipsis raises
IndexError
,
e.g.,a[..., ...]
. - Non-integers used as index values raise
TypeError
,
e.g., inreshape
,take
, and specifying reduce axis.
FutureWarning to changed behavior
np.full
now returns an array of the fill-value's dtype if no dtype is
given, instead of defaulting to float.- np.average will emit a warning if the argument is a subclass of ndarray,
as the subclass will be preserved starting in 1.13. (see Future Changes)
power
and **
raise errors for integer to negative integer powers
The previous behavior depended on whether numpy scalar integers or numpy
integer arrays were involved.
For arrays
- Zero to negative integer powers returned least integral value.
- Both 1, -1 to negative integer powers returned correct values.
- The remaining integers returned zero when raised to negative integer powers.
For scalars
- Zero to negative integer powers returned least integral value.
- Both 1, -1 to negative integer powers returned correct values.
- The remaining integers sometimes returned zero, sometimes the
correct float depending on the integer type combination.
All of these cases now raise a ValueError
except for those integer
combinations whose common type is float, for instance uint64 and int8. It was
felt that a simple rule was the best way to go rather than have special
exceptions for the integer units. If you need negative powers, use an inexact
type.
Relaxed stride checking is the default
This will have some impact on code that assumed that F_CONTIGUOUS
and
C_CONTIGUOUS
were mutually exclusive and could be set to determine the
default order for arrays that are now both.
The np.percentile
'midpoint' interpolation method fixed for exact indices
The 'midpoint' interpolator now gives the same result as 'lower' and 'higher' when
the two coincide. Previous behavior of 'lower' + 0.5 is fixed.
keepdims
kwarg is passed through to user-class methods
numpy functions that take a keepdims
kwarg now pass the value
through to the corresponding methods on ndarray sub-classes. Previously the
keepdims
keyword would be silently dropped. These functions now have
the following behavior:
- If user does not provide
keepdims
, no keyword is passed to the underlying
method. - Any user-provided value of
keepdims
is passed through as a keyword
argument to the method.
This will raise in the case where the method does not support a
keepdims
kwarg and the user explicitly passes in keepdims
.
The following functions are changed: sum
, product
,
sometrue
, alltrue
, any
, all
, amax
, amin
,
prod
, mean
, std
, var
, nanmin
, nanmax
,
nansum
, nanprod
, nanmean
, nanmedian
, nanvar
,
nanstd
bitwise_and
identity changed
The previous identity was 1, it is now -1. See entry in Improvements
_ for
more explanation.
ma.median warns and returns nan when unmasked invalid values are encountered
Similar to unmasked median the masked median ma.median
now emits a Runtime
warning and returns NaN
in slices where an unmasked NaN
is present.
Greater consistancy in assert_almost_equal
The precision check for scalars has been changed to match that for arrays. It
is now::
abs(actual - desired) < 1.5 * 10**(-decimal)
Note that this is looser than previously documented, but agrees with the
previous implementation used in assert_array_almost_equal
. Due to the
change in implementation some very delicate tests may fail that did not
fail before.
NoseTester
behaviour of warnings during testing
When raise_warnings="develop"
is given, all uncaught warnings will now
be considered a test failure. Previously only selected ones were raised.
Warnings which are not caught or raised (mostly when in release mode)
will be shown once during the test cycle similar to the default python
settings.
assert_warns
and deprecated
decorator more specific
The assert_warns
function and context manager are now more specific
to the given warning category. This increased specificity leads to them
being handled according to the outer warning settings. This means that
no warning may be raised in cases where a wrong category warning is given
and ignored outside the context. Alternatively the increased specificity
may mean that warnings that were incorrectly ignored will now be shown
or raised. See also the new suppress_warnings
context manager.
The same is true for the deprecated
decorator.
C API
No changes.
New Features
Writeable keyword argument for as_strided
np.lib.stride_tricks.as_strided
now has a writeable
keyword argument. It can be set to False when no write operation
to the returned array is expected to avoid accidental
unpredictable writes.
axes
keyword argument for rot90
The axes
keyword argument in rot90
determines the plane in which the
array is rotated. It defaults to axes=(0,1)
as in the originial function.
Generalized flip
flipud
and fliplr
reverse the elements of an array along axis=0 and
axis=1 respectively. The newly added flip
function reverses the elements of
an array along any given axis.
np.count_nonzero
now has anaxis
parameter, allowing
non-zero counts to be generated on more than just a flattened
array object.
BLIS support in numpy.distutils
Building against the BLAS implementation provided by the BLIS library is now
supported. See the [blis]
section in site.cfg.example
(in the root of
the numpy repo or source distribution).
Hook in numpy/__init__.py
to run distribution-specific checks
Binary distributions of numpy may need to run specific hardware checks or load
specific libraries during numpy initialization. For example, if we are
distributing numpy with a BLAS library that requires SSE2 instructions, we
would like to check the machine on which numpy is running does have SSE2 in
order to give an informative error.
Add a hook in numpy/__init__.py
to import a numpy/_distributor_init.py
file that will remain empty (bar a docstring) in the standard numpy source,
but that can be overwritten by people making binary distributions of numpy.
New nanfunctions nancumsum
and `n...
v1.12.0rc1
NumPy 1.12.0 Release Notes
This release supports Python 2.7 and 3.4 - 3.6.
Highlights
The NumPy 1.12.0 release contains a large number of fixes and improvements, but
few that stand out above all others. That makes picking out the highlights
somewhat arbitrary but the following may be of particular interest or indicate
areas likely to have future consequences.
- Order of operations in
np.einsum
can now be optimized for large speed improvements. - New
signature
argument tonp.vectorize
for vectorizing with core dimensions. - The
keepdims
argument was added to many functions. - New context manager for testing warnings
- Support for BLIS in numpy.distutils
- Much improved support for PyPy (not yet finished)
Dropped Support
- Support for Python 2.6, 3.2, and 3.3 has been dropped.
Added Support
- Support for PyPy 2.7 v5.6.0 has been added. While not complete (nditer
updateifcopy
is not supported yet), this is a milestone for PyPy's
C-API compatibility layer.
Build System Changes
- Library order is preserved, instead of being reordered to match that of
the directories.
Deprecations
Assignment of ndarray object's data
attribute
Assigning the 'data' attribute is an inherently unsafe operation as pointed
out in gh-7083. Such a capability will be removed in the future.
Unsafe int casting of the num attribute in linspace
np.linspace
now raises DeprecationWarning when num cannot be safely
interpreted as an integer.
Insufficient bit width parameter to binary_repr
If a 'width' parameter is passed into binary_repr
that is insufficient to
represent the number in base 2 (positive) or 2's complement (negative) form,
the function used to silently ignore the parameter and return a representation
using the minimal number of bits needed for the form in question. Such behavior
is now considered unsafe from a user perspective and will raise an error in the
future.
Future Changes
- In 1.13 NAT will always compare False except for
NAT != NAT
,
which will be True. In short, NAT will behave like NaN - In 1.13 np.average will preserve subclasses, to match the behavior of most
other numpy functions such as np.mean. In particular, this means calls which
returned a scalar may return a 0-d subclass object instead.
Multiple-field manipulation of structured arrays
In 1.13 the behavior of structured arrays involving multiple fields will change
in two ways:
First, indexing a structured array with multiple fields (eg,
arr[['f1', 'f3']]
) will return a view into the original array in 1.13,
instead of a copy. Note the returned view will have extra padding bytes
corresponding to intervening fields in the original array, unlike the copy in
1.12, which will affect code such as arr[['f1', 'f3']].view(newdtype)
.
Second, for numpy versions 1.6 to 1.12 assignment between structured arrays
occurs "by field name": Fields in the destination array are set to the
identically-named field in the source array or to 0 if the source does not have
a field::
>>> a = np.array([(1,2),(3,4)], dtype=[('x', 'i4'), ('y', 'i4')])
>>> b = np.ones(2, dtype=[('z', 'i4'), ('y', 'i4'), ('x', 'i4')])
>>> b[:] = a
>>> b
array([(0, 2, 1), (0, 4, 3)],
dtype=[('z', '<i4'), ('y', '<i4'), ('x', '<i4')])
In 1.13 assignment will instead occur "by position": The Nth field of the
destination will be set to the Nth field of the source regardless of field
name. The old behavior can be obtained by using indexing to reorder the fields
before
assignment, e.g., b[['x', 'y']] = a[['y', 'x']]
.
Compatibility notes
DeprecationWarning to error
- Indexing with floats raises
IndexError
,
e.g., a[0, 0.0]. - Indexing with non-integer array_like raises
IndexError
,
e.g.,a['1', '2']
- Indexing with multiple ellipsis raises
IndexError
,
e.g.,a[..., ...]
. - Non-integers used as index values raise
TypeError
,
e.g., inreshape
,take
, and specifying reduce axis.
FutureWarning to changed behavior
np.full
now returns an array of the fill-value's dtype if no dtype is
given, instead of defaulting to float.- np.average will emit a warning if the argument is a subclass of ndarray,
as the subclass will be preserved starting in 1.13. (see Future Changes)
power
and **
raise errors for integer to negative integer powers
The previous behavior depended on whether numpy scalar integers or numpy
integer arrays were involved.
For arrays
- Zero to negative integer powers returned least integral value.
- Both 1, -1 to negative integer powers returned correct values.
- The remaining integers returned zero when raised to negative integer powers.
For scalars
- Zero to negative integer powers returned least integral value.
- Both 1, -1 to negative integer powers returned correct values.
- The remaining integers sometimes returned zero, sometimes the
correct float depending on the integer type combination.
All of these cases now raise a ValueError
except for those integer
combinations whose common type is float, for instance uint64 and int8. It was
felt that a simple rule was the best way to go rather than have special
exceptions for the integer units. If you need negative powers, use an inexact
type.
Relaxed stride checking is the default
This will have some impact on code that assumed that F_CONTIGUOUS
and
C_CONTIGUOUS
were mutually exclusive and could be set to determine the
default order for arrays that are now both.
The np.percentile
'midpoint' interpolation method fixed for exact indices
The 'midpoint' interpolator now gives the same result as 'lower' and 'higher' when
the two coincide. Previous behavior of 'lower' + 0.5 is fixed.
keepdims
kwarg is passed through to user-class methods
numpy functions that take a keepdims
kwarg now pass the value
through to the corresponding methods on ndarray sub-classes. Previously the
keepdims
keyword would be silently dropped. These functions now have
the following behavior:
- If user does not provide
keepdims
, no keyword is passed to the underlying
method. - Any user-provided value of
keepdims
is passed through as a keyword
argument to the method.
This will raise in the case where the method does not support a
keepdims
kwarg and the user explicitly passes in keepdims
.
The following functions are changed: sum
, product
,
sometrue
, alltrue
, any
, all
, amax
, amin
,
prod
, mean
, std
, var
, nanmin
, nanmax
,
nansum
, nanprod
, nanmean
, nanmedian
, nanvar
,
nanstd
bitwise_and
identity changed
The previous identity was 1, it is now -1. See entry in Improvements
_ for
more explanation.
ma.median warns and returns nan when unmasked invalid values are encountered
Similar to unmasked median the masked median ma.median
now emits a Runtime
warning and returns NaN
in slices where an unmasked NaN
is present.
Greater consistancy in assert_almost_equal
The precision check for scalars has been changed to match that for arrays. It
is now::
abs(actual - desired) < 1.5 * 10**(-decimal)
Note that this is looser than previously documented, but agrees with the
previous implementation used in assert_array_almost_equal
. Due to the
change in implementation some very delicate tests may fail that did not
fail before.
NoseTester
behaviour of warnings during testing
When raise_warnings="develop"
is given, all uncaught warnings will now
be considered a test failure. Previously only selected ones were raised.
Warnings which are not caught or raised (mostly when in release mode)
will be shown once during the test cycle similar to the default python
settings.
assert_warns
and deprecated
decorator more specific
The assert_warns
function and context manager are now more specific
to the given warning category. This increased specificity leads to them
being handled according to the outer warning settings. This means that
no warning may be raised in cases where a wrong category warning is given
and ignored outside the context. Alternatively the increased specificity
may mean that warnings that were incorrectly ignored will now be shown
or raised. See also the new suppress_warnings
context manager.
The same is true for the deprecated
decorator.
C API
No changes.
New Features
Writeable keyword argument for as_strided
np.lib.stride_tricks.as_strided
now has a writeable
keyword argument. It can be set to False when no write operation
to the returned array is expected to avoid accidental
unpredictable writes.
axes
keyword argument for rot90
The axes
keyword argument in rot90
determines the plane in which the
array is rotated. It defaults to axes=(0,1)
as in the originial function.
Generalized flip
flipud
and fliplr
reverse the elements of an array along axis=0 and
axis=1 respectively. The newly added flip
function reverses the elements of
an array along any given axis.
np.count_nonzero
now has anaxis
parameter, allowing
non-zero counts to be generated on more than just a flattened
array object.
BLIS support in numpy.distutils
Building against the BLAS implementation provided by the BLIS library is now
supported. See the [blis]
section in site.cfg.example
(in the root of
the numpy repo or source distribution).
Hook in numpy/__init__.py
to run distribution-specific checks
Binary distributions of numpy may need to run specific hardware checks or load
specific libraries during numpy initialization. For example, if we are
distributing numpy with a BLAS library that requires SSE2 instructions, we
would like to check the machine on which numpy is running does have SSE2 in
order to give an informative error.
Add a hook in numpy/__init__.py
to import a numpy/_distributor_init.py
file that will remain empty (bar a docstring) in the standard numpy source,
but that can be overwritten by people making binary distributions of numpy.
New nanfunctions nancumsum
and `n...
v1.11.3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NumPy 1.11.3 Release Notes
Numpy 1.11.3 fixes a bug that leads to file corruption when very large files
opened in append mode are used in ndarray.tofile
. It supports Python
versions 2.6 - 2.7 and 3.2 - 3.5. Wheels for Linux, Windows, and OS X can be
found on PyPI.
Contributors to maintenance/1.11.3
A total of 2 people contributed to this release. People with a "+" by their
names contributed a patch for the first time.
- - Charles Harris
- - Pavel Potocek +
Pull Requests Merged
- -
#8341 <https://github.com/numpy/numpy/pull/8341>
__: BUG: Fix ndarray.tofile large file corruption in append mode. - -
#8346 <https://github.com/numpy/numpy/pull/8346>
__: TST: Fix tests in PR #8341 for NumPy 1.11.x
Checksums
MD5
f36503c6665701e1ca0fd2953b6419dd numpy-1.11.3-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
ada01f12b747c0669be00be843fde6dd numpy-1.11.3-cp27-cp27m-manylinux1_i686.whl
e3f454dc204b90015e4d8991b12069fb numpy-1.11.3-cp27-cp27m-manylinux1_x86_64.whl
cccfb3f765fa2eb4759590467a5f3fb1 numpy-1.11.3-cp27-cp27mu-manylinux1_i686.whl
479c0c8b50ab0ed4acca0a66887fe74c numpy-1.11.3-cp27-cp27mu-manylinux1_x86_64.whl
110b93cc26ca556b075316bee81f8652 numpy-1.11.3-cp27-none-win32.whl
33bfb4c5f5608d3966a6600fa3d7623c numpy-1.11.3-cp27-none-win_amd64.whl
81df8e91c06595572583cd67fcb7d68f numpy-1.11.3-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
194d8903cb3fd3b17af4093089b1a154 numpy-1.11.3-cp34-cp34m-manylinux1_i686.whl
837d9d7c911d4589172d19d0d8fb4eaf numpy-1.11.3-cp34-cp34m-manylinux1_x86_64.whl
f6b24305ab3edba245106b49b97fd9d7 numpy-1.11.3-cp34-none-win32.whl
2f3fdd08d9ad43304d67c16182ff92de numpy-1.11.3-cp34-none-win_amd64.whl
f90839ad86e3ccda9a409ce93ca1cccc numpy-1.11.3-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
3b2268154e405f895402cbd4cbcaad7a numpy-1.11.3-cp35-cp35m-manylinux1_i686.whl
3d6754274af48c1c19154dd370ddb569 numpy-1.11.3-cp35-cp35m-manylinux1_x86_64.whl
f8b64f46cc0e9a3fc877f24efd5e3b7c numpy-1.11.3-cp35-none-win32.whl
b1a53851dde805a233e6c4eafe116e82 numpy-1.11.3-cp35-none-win_amd64.whl
b8a9dec6901c046edaea706bad1448b1 numpy-1.11.3.tar.gz
aa70cd5bba81b78382694d654ed10036 numpy-1.11.3.zip
SHA256
5941d3dbd0afed1ecd3746c0371b2a8b79977d084004cc320c2a4cf9d88589d8 numpy-1.11.3-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
ca37b5bebcc4ebde39dfbff0bda69fdc28785a8ff21155fd7adacf473c7b40dd numpy-1.11.3-cp27-cp27m-manylinux1_i686.whl
276cbb35b69eb2f0d5f264b7c71bdc1f4e91ecd3125d32cd1839873268239892 numpy-1.11.3-cp27-cp27m-manylinux1_x86_64.whl
1226e259d796207e8ef36762dce139e7da1cc0bb78f5d54e739252acd07834e5 numpy-1.11.3-cp27-cp27mu-manylinux1_i686.whl
674d0c1318890357f27ce3a8939e643eaf55140cfb8e84730aeee1dd769b0c21 numpy-1.11.3-cp27-cp27mu-manylinux1_x86_64.whl
f8b30c76e0f805da7ea641f52c3f6bade55d50a0767f9c89c50e4c42b2a1b34c numpy-1.11.3-cp27-none-win32.whl
8cd184b0341e1db3a5619c85f875ce511ef0eb7ec01ec320116959a3de77f1b8 numpy-1.11.3-cp27-none-win_amd64.whl
f0824beb03aff58d4062508b1dd4f737f08f5d2369f25a73c2350fe081beab2c numpy-1.11.3-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
9e4228ac322743dea101a90305ee6d54b4bf82f15d6499e55d1d9cef17bccdbb numpy-1.11.3-cp34-cp34m-manylinux1_i686.whl
195604fc19a9333f3342fcad93094b6a21bc6e6b28d7bfec14d120cb4391a032 numpy-1.11.3-cp34-cp34m-manylinux1_x86_64.whl
71a6aa8b8c9f666b541208d38b30c84df1666e4cc02fb33b59086aaea10affad numpy-1.11.3-cp34-none-win32.whl
135586ce1966dbecd9494ba30cb9beca93fad323ef9264c21efc2a0b59e449d2 numpy-1.11.3-cp34-none-win_amd64.whl
cca8af884cbf220656ca2f8f9120a634e5cfb5fdcb0a21fd83ec279cc4f46654 numpy-1.11.3-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
ab810c942ead3f5988a7bef95dc6e85b586b6e814b83d571dfbca879e245bd45 numpy-1.11.3-cp35-cp35m-manylinux1_i686.whl
7c6eb737dc3d53977c558d57625dfbecd9900a5807ff17edd6842a102cb95c3b numpy-1.11.3-cp35-cp35m-manylinux1_x86_64.whl
ab2af03dabecb97de27badfa944c56d799774a1fa975d52083197bb81858b742 numpy-1.11.3-cp35-none-win32.whl
dd1800ec19192fd853bc255917eb3ecb34de268551b9c561f36d089023883807 numpy-1.11.3-cp35-none-win_amd64.whl
6e89f41217028452977cddb2a6c614e2210214bf3efb8494e7a9137b26985d41 numpy-1.11.3.tar.gz
2e0fc5248246a64628656fe14fcab0a959741a2820e003bd15538226501b82f7 numpy-1.11.3.zip
-----BEGIN PGP SIGNATURE-----
iQEcBAEBAgAGBQJYVz6CAAoJEGefIoN3xSR7PUsH/iK2boFNPG2x6RQ2bIvYW/eC
iDw5Aewhv5VJRch8QUDAJAVX228Zw4rKY4mxgyXMBvd2ZGL0+E6lMSlooK9r4Sz+
y+lnHyWFc1UjxgQla46TUV77l8PBMjXUKgPQl+Whp8YYwqKd5Q1ZYmDcbNwuNZNc
lw7aRcVMF2/hv02B+SYaxp2eo7VQVYf6OJQ3a2Ya8bdLUr2M5kUbVeUk4fpUhQXT
FX3E0jFlxELm3y6YkC3mxgyp9kAOOn0d2M7y9IjufOaj7F+oCg+uHMfPTK6EqnoU
7T08Hy8TSdyoUY4ueRsoj3Ns/iwaM88iR133A4UR7vbNkaIDkVhCE/isrdvwbwk=
=SJME
-----END PGP SIGNATURE-----