summaryrefslogtreecommitdiff
path: root/numpy/lib/utils.py
diff options
context:
space:
mode:
authorNico Schlömer <nico.schloemer@gmail.com>2017-08-11 03:01:06 +0200
committerEric Wieser <wieser.eric@gmail.com>2017-08-10 20:01:06 -0500
commit029863eae86b9df2de4b9a9843ca8f88c99130df (patch)
treeced3f88544979e2dc6f7eb327963c5d2688374ef /numpy/lib/utils.py
parent4c18530b1e3e428a3755c6847f70322ec12bdbc2 (diff)
downloadnumpy-029863eae86b9df2de4b9a9843ca8f88c99130df.tar.gz
MAINT: Use moveaxis instead of rollaxis internally (#9475)
Also add a hint to the documentation advising the use of moveaxis over rollaxis. Tests for rollaxis are left alone.
Diffstat (limited to 'numpy/lib/utils.py')
-rw-r--r--numpy/lib/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py
index 6e150add3..e18eda0fb 100644
--- a/numpy/lib/utils.py
+++ b/numpy/lib/utils.py
@@ -1138,7 +1138,7 @@ def _median_nancheck(data, result, axis, out):
"""
if data.size == 0:
return result
- data = np.rollaxis(data, axis, data.ndim)
+ data = np.moveaxis(data, axis, -1)
n = np.isnan(data[..., -1])
# masked NaN values are ok
if np.ma.isMaskedArray(n):