summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
authorJoseph Fox-Rabinovitz <jfoxrabinovitz@gmail.com>2016-01-27 00:13:00 -0500
committerJoseph Fox-Rabinovitz <jfoxrabinovitz@gmail.com>2016-01-27 00:13:00 -0500
commitd7c847b0cb6bdfe46862de9013b3bf7d1e909eb7 (patch)
treef5b1eed4c11ea2079966f20d4a30c96522583318 /numpy/lib/function_base.py
parent3690e967324fe41050755d6b8e9d8bbf83b999d1 (diff)
downloadnumpy-d7c847b0cb6bdfe46862de9013b3bf7d1e909eb7.tar.gz
MAINT: Accepted all review comments for PR#7125
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r--numpy/lib/function_base.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index 098fba4f5..4f1de30ec 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -3383,7 +3383,7 @@ def percentile(a, q, axis=None, out=None,
"""
Compute the qth percentile of the data along the specified axis.
- Returns the qth percentile (or percentiles) of the array elements.
+ Returns the qth percentile(s) of the array elements.
Parameters
----------
@@ -3429,7 +3429,7 @@ def percentile(a, q, axis=None, out=None,
Returns
-------
percentile : scalar or ndarray
- If `q` is a single percentile and `axis=None`, then the return is a
+ If `q` is a single percentile and `axis=None`, then the result is a
scalar. If multiple percentiles are given, the result is an an array.
The percentiles are listed in the first axis. The remaining axes are the
reduced axes of the input `a`. If the input contains integers or floats
@@ -3476,11 +3476,7 @@ def percentile(a, q, axis=None, out=None,
>>> b = a.copy()
>>> np.percentile(b, 50, axis=1, overwrite_input=True)
array([ 7., 2.])
- >>> assert not np.all(a==b)
- >>> b = a.copy()
- >>> np.percentile(b, 50, axis=None, overwrite_input=True)
- 3.5
- >>> assert not np.all(a==b)
+ >>> assert not np.all(a == b)
"""
q = array(q, dtype=np.float64, copy=True)