diff options
author | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2023-10-01 04:35:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-01 04:35:54 (GMT) |
commit | 62405c7867b03730f0d278ea845855692d262d44 (patch) | |
tree | a5e220ee8d106b2ea59ed23031401228c6cf25a0 /Doc | |
parent | a46e96076898d126c9f276aef1934195aac34b4e (diff) | |
download | cpython-62405c7867b03730f0d278ea845855692d262d44.zip cpython-62405c7867b03730f0d278ea845855692d262d44.tar.gz cpython-62405c7867b03730f0d278ea845855692d262d44.tar.bz2 |
gh-110150: Fix base case handling in quantiles() (gh-110151)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/statistics.rst | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/library/statistics.rst b/Doc/library/statistics.rst index f3c1bf2..5c8ad3a 100644 --- a/Doc/library/statistics.rst +++ b/Doc/library/statistics.rst @@ -585,7 +585,7 @@ However, for reading convenience, most of the examples show sorted sequences. The *data* can be any iterable containing sample data. For meaningful results, the number of data points in *data* should be larger than *n*. - Raises :exc:`StatisticsError` if there are not at least two data points. + Raises :exc:`StatisticsError` if there is not at least one data point. The cut points are linearly interpolated from the two nearest data points. For example, if a cut point falls one-third @@ -625,6 +625,11 @@ However, for reading convenience, most of the examples show sorted sequences. .. versionadded:: 3.8 + .. versionchanged:: 3.13 + No longer raises an exception for an input with only a single data point. + This allows quantile estimates to be built up one sample point + at a time becoming gradually more refined with each new data point. + .. function:: covariance(x, y, /) Return the sample covariance of two inputs *x* and *y*. Covariance |