diff options
author | jaimefrio <jaime.frio@gmail.com> | 2015-01-20 19:15:00 -0800 |
---|---|---|
committer | jaimefrio <jaime.frio@gmail.com> | 2015-01-20 19:15:16 -0800 |
commit | 1d3bcb446771ff16e9cf06e3a5d9cac20e68c4ac (patch) | |
tree | bc99b9fe2d16713d54216cbd01b30c244406628a /doc/release | |
parent | 4ed1587a7de85b4fa01dff8ef6e0e901a25f149c (diff) | |
download | numpy-1d3bcb446771ff16e9cf06e3a5d9cac20e68c4ac.tar.gz |
ENH: Make swapaxes always return a view
swapaxes now returns a view of the input array when the axes to swap
are both the same, not the input array as it used to do. Fixes #5260
Diffstat (limited to 'doc/release')
-rw-r--r-- | doc/release/1.10.0-notes.rst | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/release/1.10.0-notes.rst b/doc/release/1.10.0-notes.rst index 26559ad32..76538760e 100644 --- a/doc/release/1.10.0-notes.rst +++ b/doc/release/1.10.0-notes.rst @@ -50,12 +50,17 @@ 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. -*rollaxis* always returns a view -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*rollaxis* and *swapaxes* always return a view +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Previously, a view was returned except when no change was made in the order of the axes, in which case the input array was returned. A view is now returned in all cases. +C API +~~~~~ +The changes to *swapaxes* also apply to the *PyArray_SwapAxes* C function, +which now returns a view in all cases. + New Features ============ |