summaryrefslogtreecommitdiff
path: root/numpy/lib/nanfunctions.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/nanfunctions.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/nanfunctions.py')
-rw-r--r--numpy/lib/nanfunctions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/nanfunctions.py b/numpy/lib/nanfunctions.py
index 90120719e..79bf01281 100644
--- a/numpy/lib/nanfunctions.py
+++ b/numpy/lib/nanfunctions.py
@@ -1174,7 +1174,7 @@ def _nanpercentile(a, q, axis=None, out=None, overwrite_input=False,
# Move that axis to the beginning to match percentile's
# convention.
if q.ndim != 0:
- result = np.rollaxis(result, axis)
+ result = np.moveaxis(result, axis, 0)
if out is not None:
out[...] = result