diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2015-01-20 22:44:42 -0500 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2015-01-20 22:44:42 -0500 |
commit | 960433e8f5f39587d10c60ed1d3f50591434a82b (patch) | |
tree | 4b57f21d0e1312adb349dd74a4558a3b3dba0e02 /numpy/core/fromnumeric.py | |
parent | e73d4fcb2a0052572e6c1efaffa2b05f5931956e (diff) | |
parent | a7fdf04f2a527055afe53dfaffaca09931b12a2d (diff) | |
download | numpy-960433e8f5f39587d10c60ed1d3f50591434a82b.tar.gz |
Merge pull request #5468 from jaimefrio/swapaxes_view
ENH: Make swapaxes always return a view. Fixes #5260
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r-- | numpy/core/fromnumeric.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 2a527a4a4..aef09411a 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -464,8 +464,10 @@ def swapaxes(a, axis1, axis2): Returns ------- a_swapped : ndarray - If `a` is an ndarray, then a view of `a` is returned; otherwise - a new array is created. + For Numpy >= 1.10, if `a` is an ndarray, then a view of `a` is + returned; otherwise a new array is created. For earlier Numpy + versions a view of `a` is returned only if the order of the + axes is changed, otherwise the input array is returned. Examples -------- |