diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2016-12-11 20:02:59 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-11 20:02:59 -0500 |
commit | f55516951b77baa475a3e712f5f7cb831fb90c0a (patch) | |
tree | 622cf87f78678d40974420bd71ac74c49ae39ebf /numpy/lib/nanfunctions.py | |
parent | e00b9587052248486a9bf66c2ce95638c0d9817f (diff) | |
parent | ba6fdacd434a70496cfc61240e34045b6a6550a7 (diff) | |
download | numpy-f55516951b77baa475a3e712f5f7cb831fb90c0a.tar.gz |
Merge pull request #8366 from juliantaylor/nanperc-scalar
BUG: fix nanpercentile not returning scalar with axis argument
Diffstat (limited to 'numpy/lib/nanfunctions.py')
-rw-r--r-- | numpy/lib/nanfunctions.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/nanfunctions.py b/numpy/lib/nanfunctions.py index c024055ba..24472dfcd 100644 --- a/numpy/lib/nanfunctions.py +++ b/numpy/lib/nanfunctions.py @@ -1134,7 +1134,7 @@ def _nanpercentile(a, q, axis=None, out=None, overwrite_input=False, See nanpercentile for parameter usage """ - if axis is None: + if axis is None or a.ndim == 1: part = a.ravel() result = _nanpercentile1d(part, q, overwrite_input, interpolation) else: |