From 819d92116bd08a3732becd9895d48618588be3ba Mon Sep 17 00:00:00 2001 From: Christian Lorentzen Date: Tue, 4 Apr 2023 23:39:14 +0200 Subject: DOC quantile q is a probability --- numpy/lib/function_base.py | 8 ++++---- numpy/lib/nanfunctions.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 405790025..3a2d9b792 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -4237,8 +4237,8 @@ def quantile(a, a : array_like of real numbers Input array or object that can be converted to an array. q : array_like of float - Quantile or sequence of quantiles to compute, which must be between - 0 and 1 inclusive. + Probability or sequence of probabilities for the quantiles to compute. + Values must be between 0 and 1 inclusive. axis : {int, tuple of int, None}, optional Axis or axes along which the quantiles are computed. The default is to compute the quantile(s) along a flattened version of the array. @@ -4292,8 +4292,8 @@ def quantile(a, Returns ------- quantile : scalar or ndarray - If `q` is a single quantile and `axis=None`, then the result - is a scalar. If multiple quantiles are given, first axis of + If `q` is a single probability and `axis=None`, then the result + is a scalar. If multiple probabilies levels are given, first axis of the result corresponds to the quantiles. The other axes are the axes that remain after the reduction of `a`. If the input contains integers or floats smaller than ``float64``, the output diff --git a/numpy/lib/nanfunctions.py b/numpy/lib/nanfunctions.py index 7e5528646..b3b570860 100644 --- a/numpy/lib/nanfunctions.py +++ b/numpy/lib/nanfunctions.py @@ -1415,8 +1415,8 @@ def nanquantile( Input array or object that can be converted to an array, containing nan values to be ignored q : array_like of float - Quantile or sequence of quantiles to compute, which must be between - 0 and 1 inclusive. + Probability or sequence of probabilities for the quantiles to compute. + Values must be between 0 and 1 inclusive. axis : {int, tuple of int, None}, optional Axis or axes along which the quantiles are computed. The default is to compute the quantile(s) along a flattened @@ -1476,8 +1476,8 @@ def nanquantile( Returns ------- quantile : scalar or ndarray - If `q` is a single percentile and `axis=None`, then the result - is a scalar. If multiple quantiles are given, first axis of + If `q` is a single probability and `axis=None`, then the result + is a scalar. If multiple probability levels are given, first axis of the result corresponds to the quantiles. The other axes are the axes that remain after the reduction of `a`. If the input contains integers or floats smaller than ``float64``, the output -- cgit v1.2.1 From 1947415e4d4f4cb75989e194e052431068dbd772 Mon Sep 17 00:00:00 2001 From: Christian Lorentzen Date: Wed, 26 Apr 2023 23:24:30 +0200 Subject: DOC use percentage for q in percentile --- numpy/lib/function_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 3a2d9b792..964d4e067 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -3937,8 +3937,8 @@ def percentile(a, a : array_like of real numbers Input array or object that can be converted to an array. q : array_like of float - Percentile or sequence of percentiles to compute, which must be between - 0 and 100 inclusive. + Percentage or sequence of percentages for the percentiles to compute. + Values must be between 0 and 100 inclusive. axis : {int, tuple of int, None}, optional Axis or axes along which the percentiles are computed. The default is to compute the percentile(s) along a flattened -- cgit v1.2.1