diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2016-02-05 15:15:40 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2016-02-05 15:15:40 -0700 |
commit | 48cae084cd0c0dea86d3246cf02a01bfc202f5f4 (patch) | |
tree | 22cab13ac903ee1e930c47fe41e35210e8de3a72 /numpy/lib/nanfunctions.py | |
parent | 87f287a3d3483332f37a1449c40b8b15be8519de (diff) | |
parent | e30d80266d476841e51d36432d1640f278a5fa05 (diff) | |
download | numpy-48cae084cd0c0dea86d3246cf02a01bfc202f5f4.tar.gz |
Merge pull request #7180 from madphysicist/nanpercentile-dims
BUG: Fixed previous attempt to fix dimension mismatch in nanpercentile
Diffstat (limited to 'numpy/lib/nanfunctions.py')
-rw-r--r-- | numpy/lib/nanfunctions.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/lib/nanfunctions.py b/numpy/lib/nanfunctions.py index 6b28b4a35..491a28d22 100644 --- a/numpy/lib/nanfunctions.py +++ b/numpy/lib/nanfunctions.py @@ -979,7 +979,8 @@ 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.swapaxes(result, 0, axis) + result = np.rollaxis(result, axis) + if out is not None: out[...] = result return result |