summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMarten van Kerkwijk <mhvk@astro.utoronto.ca>2016-11-18 13:55:45 -0500
committerMarten van Kerkwijk <mhvk@astro.utoronto.ca>2016-11-19 12:50:28 -0500
commit3f3d205cd3f607caeada0dddf41e996e288a3c50 (patch)
treed2e8cf7b53e0835edcdff4ee63fbbd7dc7a9665c /doc
parentec02bdc782f1de83520dfd2c4eb0c48d69c909e6 (diff)
downloadnumpy-3f3d205cd3f607caeada0dddf41e996e288a3c50.tar.gz
MAINT: let average preserve subclass information.
This behaviour matches that for most other numpy functions (such as np.mean). It was initially slated for 1.12, but replaced by a FutureWarning. Hence, this is for 1.13.
Diffstat (limited to 'doc')
-rw-r--r--doc/release/1.13.0-notes.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/release/1.13.0-notes.rst b/doc/release/1.13.0-notes.rst
index f37ba90ae..bd5be6859 100644
--- a/doc/release/1.13.0-notes.rst
+++ b/doc/release/1.13.0-notes.rst
@@ -33,6 +33,11 @@ DeprecationWarning to error
FutureWarning to changed behavior
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* ``numpy.average`` now preserves subclasses, matching the behavior of most
+ other numpy functions such as ``mean``. As a consequence, also calls that
+ returned a scalar may now return a subclass array scalar.
+
+
C API
~~~~~
@@ -53,3 +58,10 @@ Improvements
Changes
=======
+
+``average`` now preserves subclasses
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+For ndarray subclasses, ``numpy.average`` will now return an instance of the
+subclass, matching the behavior of most other numpy functions such as ``mean``.
+As a consequence, also calls that returned a scalar may now return a subclass
+array scalar.