diff options
author | Stefan van der Walt <stefan@sun.ac.za> | 2010-05-16 08:30:47 +0000 |
---|---|---|
committer | Stefan van der Walt <stefan@sun.ac.za> | 2010-05-16 08:30:47 +0000 |
commit | 7c92f3237ec81e42d490d3b5eff89725608a112d (patch) | |
tree | 37487019014bab22d9935e81db395be450d0ea13 /numpy/lib/function_base.py | |
parent | 44b42db55290aedbf3e30ef2de81d0bccc547a04 (diff) | |
download | numpy-7c92f3237ec81e42d490d3b5eff89725608a112d.tar.gz |
BUG: Allow any array-like input to percentile.
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index b42452b4a..7d825136c 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -2940,6 +2940,8 @@ def percentile(a, q, axis=None, out=None, overwrite_input=False): >>> assert not np.all(a==b) """ + a = np.asarray(a) + if q == 0: return a.min(axis=axis, out=out) elif q == 100: |