diff options
author | Garrett-R <garrettreynolds5@gmail.com> | 2014-12-16 22:50:26 -0800 |
---|---|---|
committer | Garrett-R <garrettreynolds5@gmail.com> | 2015-01-02 10:52:05 +0530 |
commit | 78f69df28acd80654705a43bcf1e977b9c423b53 (patch) | |
tree | c591ae02c93cafb3caf861b997a665c0c3011122 /doc/release | |
parent | fb898ce678c8d45364d1ee7b1a6d0308562a8ad9 (diff) | |
download | numpy-78f69df28acd80654705a43bcf1e977b9c423b53.tar.gz |
BUG: Fixes #5376: np.ravel to return same array type
In PR #5358, np.diagonal was modified to return whatever array type it took in.
Also, np.cumsum and np.clip return the same array type. So, np.ravel's behavior is surprising.
Two tests which were expecting np.ravel to return an array have been changed.
Also, the optional `order` parameter was added to MaskedArray.ravel to make it compatible
(matrix.ravel already had this parameter).
Diffstat (limited to 'doc/release')
-rw-r--r-- | doc/release/1.10.0-notes.rst | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/doc/release/1.10.0-notes.rst b/doc/release/1.10.0-notes.rst index be5e475e6..e1156466a 100644 --- a/doc/release/1.10.0-notes.rst +++ b/doc/release/1.10.0-notes.rst @@ -39,11 +39,14 @@ relaxed stride checking ~~~~~~~~~~~~~~~~~~~~~~~ NPY_RELAXED_STRIDE_CHECKING is now true by default. -diag and diagonal -~~~~~~~~~~~~~~~~~ -Both diag and diagonal now preserve subtypes. This will change the -dimensions of the returned diagonal in the case of matrices and that -may lead to problems in using the result. +*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. + New Features ============ |