Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6da9078

Browse files
committed
Issue #27825: Improve for statistics data arguments. (Contributed by Mariatta Wijaya.)
1 parent 8c5e190 commit 6da9078

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Doc/library/statistics.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ However, for reading convenience, most of the examples show sorted sequences.
6969

7070
.. function:: mean(data)
7171

72-
Return the sample arithmetic mean of *data*, a sequence or iterator of
73-
real-valued numbers.
72+
Return the sample arithmetic mean of *data* which can be a sequence or iterator.
7473

7574
The arithmetic mean is the sum of the data divided by the number of data
7675
points. It is commonly called "the average", although it is only one of many
@@ -148,6 +147,7 @@ However, for reading convenience, most of the examples show sorted sequences.
148147

149148
Return the median (middle value) of numeric data, using the common "mean of
150149
middle two" method. If *data* is empty, :exc:`StatisticsError` is raised.
150+
*data* can be a sequence or iterator.
151151

152152
The median is a robust measure of central location, and is less affected by
153153
the presence of outliers in your data. When the number of data points is
@@ -175,7 +175,7 @@ However, for reading convenience, most of the examples show sorted sequences.
175175
.. function:: median_low(data)
176176

177177
Return the low median of numeric data. If *data* is empty,
178-
:exc:`StatisticsError` is raised.
178+
:exc:`StatisticsError` is raised. *data* can be a sequence or iterator.
179179

180180
The low median is always a member of the data set. When the number of data
181181
points is odd, the middle value is returned. When it is even, the smaller of
@@ -195,7 +195,7 @@ However, for reading convenience, most of the examples show sorted sequences.
195195
.. function:: median_high(data)
196196

197197
Return the high median of data. If *data* is empty, :exc:`StatisticsError`
198-
is raised.
198+
is raised. *data* can be a sequence or iterator.
199199

200200
The high median is always a member of the data set. When the number of data
201201
points is odd, the middle value is returned. When it is even, the larger of
@@ -216,7 +216,7 @@ However, for reading convenience, most of the examples show sorted sequences.
216216

217217
Return the median of grouped continuous data, calculated as the 50th
218218
percentile, using interpolation. If *data* is empty, :exc:`StatisticsError`
219-
is raised.
219+
is raised. *data* can be a sequence or iterator.
220220

221221
.. doctest::
222222

0 commit comments

Comments
 (0)