summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2021-11-12 11:57:22 -0600
committerSebastian Berg <sebastian@sipsolutions.net>2021-11-12 12:12:00 -0600
commit7d8a8e746fc841a99f71242f60559b1be2e7340c (patch)
treee9340c03270e8da3d49b7ce54d8e74b66bf2f316 /numpy/lib/function_base.py
parent5bd71fb76c68f41debe3a15fbf316ce6ef7fd795 (diff)
downloadnumpy-7d8a8e746fc841a99f71242f60559b1be2e7340c.tar.gz
DOC: Update percentile/quantile docs
Mainly fixes the method list slightly, tones down the warning a bit and fixes the link to the paper (I did not realize that the link failed to work due only because the reference was missing from nanquantile/nanpercentile).
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r--numpy/lib/function_base.py60
1 files changed, 30 insertions, 30 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index 558dfbe34..6d84627cd 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -3898,21 +3898,21 @@ def percentile(a,
method : str, optional
This parameter specifies the method to use for estimating the
percentile. There are many different methods, some unique to NumPy.
- See the notes for explanation. The options aligning with the R types
- and the H&F paper are:
-
- * (H&F 1): 'inverted_cdf'
- * (H&F 2): 'averaged_inverted_cdf'
- * (H&F 3): 'closest_observation'
- * (H&F 4): 'interpolated_inverted_cdf'
- * (H&F 5): 'hazen'
- * (H&F 6): 'weibull'
- * (H&F 7): 'linear' (default)
- * (H&F 8): 'median_unbiased'
- * (H&F 9): 'normal_unbiased'
-
- Mainly for compatibility reasons, NumPy also supports the following
- options which appear to be unique to NumPy:
+ See the notes for explanation. The options sorted by their R type
+ as summarized in the H&F paper [1]_ are:
+
+ 1. 'inverted_cdf'
+ 2. 'averaged_inverted_cdf'
+ 3. 'closest_observation'
+ 4. 'interpolated_inverted_cdf'
+ 5. 'hazen'
+ 6. 'weibull'
+ 7. 'linear' (default)
+ 8. 'median_unbiased'
+ 9. 'normal_unbiased'
+
+ The first three methods are discontiuous. NumPy further defines the
+ following discontinuous variations of the default 'linear' (7.) option:
* 'lower'
* 'higher',
@@ -4177,21 +4177,21 @@ def quantile(a,
method : str, optional
This parameter specifies the method to use for estimating the
quantile. There are many different methods, some unique to NumPy.
- See the notes for explanation. The options aligning with the R types
- and the H&F paper are:
-
- * (H&F 1): 'inverted_cdf'
- * (H&F 2): 'averaged_inverted_cdf'
- * (H&F 3): 'closest_observation'
- * (H&F 4): 'interpolated_inverted_cdf'
- * (H&F 5): 'hazen'
- * (H&F 6): 'weibull'
- * (H&F 7): 'linear' (default)
- * (H&F 8): 'median_unbiased'
- * (H&F 9): 'normal_unbiased'
-
- Mainly for compatibility reasons, NumPy also supports the following
- options which appear to be unique to NumPy:
+ See the notes for explanation. The options sorted by their R type
+ as summarized in the H&F paper [1]_ are:
+
+ 1. 'inverted_cdf'
+ 2. 'averaged_inverted_cdf'
+ 3. 'closest_observation'
+ 4. 'interpolated_inverted_cdf'
+ 5. 'hazen'
+ 6. 'weibull'
+ 7. 'linear' (default)
+ 8. 'median_unbiased'
+ 9. 'normal_unbiased'
+
+ The first three methods are discontiuous. NumPy further defines the
+ following discontinuous variations of the default 'linear' (7.) option:
* 'lower'
* 'higher',