summaryrefslogtreecommitdiff
path: root/doc/release/1.15.0-notes.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/release/1.15.0-notes.rst')
-rw-r--r--doc/release/1.15.0-notes.rst33
1 files changed, 33 insertions, 0 deletions
diff --git a/doc/release/1.15.0-notes.rst b/doc/release/1.15.0-notes.rst
index 23e0284c4..e8465d21c 100644
--- a/doc/release/1.15.0-notes.rst
+++ b/doc/release/1.15.0-notes.rst
@@ -85,6 +85,16 @@ Future Changes
Compatibility notes
===================
+The ``NpzFile`` returned by ``np.savez`` is now a `collections.abc.Mapping`
+---------------------------------------------------------------------------
+This means it behaves like a readonly dictionary, and has a new ``.values()``
+method and ``len()`` implementation.
+
+On python 3, this means that ``.iteritems()``, ``.iterkeys()`` have been
+deprecated, and ``.keys()`` and ``.items()`` now return views and not lists.
+This is consistent with how the builtin ``dict`` type changed between python 2
+and python 3.
+
Under certain conditions, nditer must be used in a context manager
------------------------------------------------------------------
When using an nditer with the ``"writeonly"`` or ``"readwrite"`` flags, there
@@ -153,6 +163,12 @@ C API changes
checked before the operation whose status we wanted to check was run.
See `#10339 <https://github.com/numpy/numpy/issues/10370>`__.
+* ``PyArray_GetDTypeTransferFunction`` now defaults to using user-defined
+ ``copyswapn`` / ``copyswap`` for user-defined dtypes. If this causes a
+ significant performance hit, consider implementing ``copyswapn`` to reflect
+ the implementation of ``PyArray_GetStridedCopyFn``.
+ See `#10898 <https://github.com/numpy/numpy/pull/10898>`__.
+
New Features
============
@@ -369,5 +385,22 @@ inner-product example, ``keepdims=True, axes=[-2, -2, -2]`` would act on the
one-but-last dimension of the input arguments, and leave a size 1 dimension in
that place in the output.
+New ``np.take_along_axis`` and ``np.put_along_axis`` functions
+--------------------------------------------------------------
+When used on multidimensional arrays, ``argsort``, ``argmin``, ``argmax``, and
+``argpartition`` return arrays that are difficult to use as indices.
+``take_along_axis`` provides an easy way to use these indices to lookup values
+within an array, so that::
+
+ np.take_along_axis(a, np.argsort(a, axis=axis), axis=axis)
+
+is the same as::
+
+ np.sort(a, axis=axis)
+
+``np.put_along_axis`` acts as the dual operation for writing to these indices
+within an array.
+
+
Changes
=======