summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2015-01-06 17:16:29 -0500
committerCharles Harris <charlesr.harris@gmail.com>2015-01-06 17:16:29 -0500
commitf4be1039d6fe3e4fdc157a22e8c071ac10651997 (patch)
tree7049bc2b0cd0bbf992b8bce490f58e2fc975ae19 /doc
parent96d9c34a1ac1cb9845422d4533ba396c7a5b62a8 (diff)
parentf80d5e06485b59f8ece7421a3a81b809dd5f78f5 (diff)
downloadnumpy-f4be1039d6fe3e4fdc157a22e8c071ac10651997.tar.gz
Merge pull request #5421 from charris/special-case-matrix
Special case matrix
Diffstat (limited to 'doc')
-rw-r--r--doc/release/1.10.0-notes.rst12
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/release/1.10.0-notes.rst b/doc/release/1.10.0-notes.rst
index 90f758360..616f95f06 100644
--- a/doc/release/1.10.0-notes.rst
+++ b/doc/release/1.10.0-notes.rst
@@ -42,11 +42,13 @@ NPY_RELAXED_STRIDE_CHECKING is now true by default.
*np.ravel*, *np.diagonal* and *np.diag* now preserve subtypes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-There was inconsistent behavior between *x.ravel()* and *np.ravel(x)*, as well
-as between *x.diagonal()* and *np.diagonal(x)*. For example, if *x* was a
-matrix, then *x.ravel()* returned a matrix, while *np.ravel(x)* returned an
-ndarray. In the case of matrices, the returned value will have different
-dimensions and that may lead to problems in using the result.
+There was inconsistent behavior between *x.ravel()* and *np.ravel(x)*, as
+well as between *x.diagonal()* and *np.diagonal(x)*, with the methods
+preserving subtypes while the functions did not. This has been fixed and
+the functions now behave like the methods, preserving subtypes except in
+the case of matrices. Matrices are special cased for backward
+compatibility and still return 1-D arrays as before. If you need to
+preserve the matrix subtype, use the methods instead of the functions.
New Features