summaryrefslogtreecommitdiff
path: root/numpy/lib/nanfunctions.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2017-06-03 11:37:30 +0100
committerEric Wieser <wieser.eric@gmail.com>2017-06-03 11:54:34 +0100
commitad1e3c118f378fd62883655a9a983dd0c682f968 (patch)
tree48cff66b5d36fa041fb64655acbf038af828810b /numpy/lib/nanfunctions.py
parent090d46e76fbda7f7fc73751c221d0c58b9d889af (diff)
downloadnumpy-ad1e3c118f378fd62883655a9a983dd0c682f968.tar.gz
MAINT: Combine similar branches
Diffstat (limited to 'numpy/lib/nanfunctions.py')
-rw-r--r--numpy/lib/nanfunctions.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/numpy/lib/nanfunctions.py b/numpy/lib/nanfunctions.py
index 1e342b932..6bd949b34 100644
--- a/numpy/lib/nanfunctions.py
+++ b/numpy/lib/nanfunctions.py
@@ -1123,10 +1123,7 @@ def nanpercentile(a, q, axis=None, out=None, overwrite_input=False,
overwrite_input=overwrite_input,
interpolation=interpolation)
if keepdims and keepdims is not np._NoValue:
- if q.ndim == 0:
- return r.reshape(k)
- else:
- return r.reshape([len(q)] + k)
+ return r.reshape(q.shape + k)
else:
return r