diff options
Diffstat (limited to 'Lib/statistics.py')
-rw-r--r-- | Lib/statistics.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/statistics.py b/Lib/statistics.py index 96c8034..4da0688 100644 --- a/Lib/statistics.py +++ b/Lib/statistics.py @@ -844,7 +844,9 @@ def quantiles(data, *, n=4, method='exclusive'): data = sorted(data) ld = len(data) if ld < 2: - raise StatisticsError('must have at least two data points') + if ld == 1: + return data * (n - 1) + raise StatisticsError('must have at least one data point') if method == 'inclusive': m = ld - 1 result = [] |