This is an automated email from the ASF dual-hosted git repository.
jorisvandenbossche pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new d8ab9a8022 MINOR: [C++][Python] [Docs] clearer description of q
argument of quantiles (#37380)
d8ab9a8022 is described below
commit d8ab9a802227468976958b109c08c1ca9637a7e8
Author: Christian Lorentzen <[email protected]>
AuthorDate: Fri Sep 15 10:12:26 2023 +0200
MINOR: [C++][Python] [Docs] clearer description of q argument of quantiles
(#37380)
### Rationale for this change
Documention of the `q` parameter of quantiles is made more precise.
### What changes are included in this PR?
Only documentation changes.
### Are these changes tested?
No
### Are there any user-facing changes?
No
Authored-by: Christian Lorentzen <[email protected]>
Signed-off-by: Joris Van den Bossche <[email protected]>
---
cpp/src/arrow/compute/api_aggregate.h | 4 ++--
python/pyarrow/_compute.pyx | 6 ++++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/cpp/src/arrow/compute/api_aggregate.h
b/cpp/src/arrow/compute/api_aggregate.h
index 8f45f6199f..3493c31463 100644
--- a/cpp/src/arrow/compute/api_aggregate.h
+++ b/cpp/src/arrow/compute/api_aggregate.h
@@ -138,7 +138,7 @@ class ARROW_EXPORT QuantileOptions : public FunctionOptions
{
static constexpr char const kTypeName[] = "QuantileOptions";
static QuantileOptions Defaults() { return QuantileOptions{}; }
- /// quantile must be between 0 and 1 inclusive
+ /// probability level of quantile must be between 0 and 1 inclusive
std::vector<double> q;
enum Interpolation interpolation;
/// If true (the default), null values are ignored. Otherwise, if any value
is null,
@@ -162,7 +162,7 @@ class ARROW_EXPORT TDigestOptions : public FunctionOptions {
static constexpr char const kTypeName[] = "TDigestOptions";
static TDigestOptions Defaults() { return TDigestOptions{}; }
- /// quantile must be between 0 and 1 inclusive
+ /// probability level of quantile must be between 0 and 1 inclusive
std::vector<double> q;
/// compression parameter, default 100
uint32_t delta;
diff --git a/python/pyarrow/_compute.pyx b/python/pyarrow/_compute.pyx
index 0c1744febb..609307528d 100644
--- a/python/pyarrow/_compute.pyx
+++ b/python/pyarrow/_compute.pyx
@@ -2145,7 +2145,8 @@ class QuantileOptions(_QuantileOptions):
Parameters
----------
q : double or sequence of double, default 0.5
- Quantiles to compute. All values must be in [0, 1].
+ Probability levels of the quantiles to compute. All values must be in
+ [0, 1].
interpolation : str, default "linear"
How to break ties between competing data points for a given quantile.
Accepted values are:
@@ -2182,7 +2183,8 @@ class TDigestOptions(_TDigestOptions):
Parameters
----------
q : double or sequence of double, default 0.5
- Quantiles to approximate. All values must be in [0, 1].
+ Probability levels of the quantiles to approximate. All values must be
+ in [0, 1].
delta : int, default 100
Compression parameter for the T-digest algorithm.
buffer_size : int, default 500