summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r--numpy/lib/function_base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index ca82bb72d..fb5dd6fdd 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -4000,7 +4000,7 @@ def percentile(a,
With 'i' being the floor and 'g' the fractional part of the result.
.. math::
- i + g = (q - alpha) / ( n - alpha - beta + 1 )
+ i + g = q * ( n - alpha - beta + 1 ) + alpha
The different methods then work as follows
@@ -4279,7 +4279,7 @@ def quantile(a,
and alpha and beta are correction constants modifying i and j:
.. math::
- i + g = (q - alpha) / ( n - alpha - beta + 1 )
+ i + g = q * ( n - alpha - beta + 1 ) + alpha
The different methods then work as follows