[Python-checkins] cpython (3.6): Issue #27825: Improve for statistics data arguments. (Contributed by Mariatta

raymond.hettinger python-checkins at python.org
Mon Nov 21 19:32:03 EST 2016


https://hg.python.org/cpython/rev/71dd21a3b9cc
changeset:   105317:71dd21a3b9cc
branch:      3.6
user:        Raymond Hettinger <python at rcn.com>
date:        Mon Nov 21 16:31:02 2016 -0800
summary:
  Issue #27825: Improve for statistics data arguments. (Contributed by Mariatta Wijaya.)

files:
  Doc/library/statistics.rst |  10 +++++-----
  1 files changed, 5 insertions(+), 5 deletions(-)


diff --git a/Doc/library/statistics.rst b/Doc/library/statistics.rst
--- a/Doc/library/statistics.rst
+++ b/Doc/library/statistics.rst
@@ -69,8 +69,7 @@
 
 .. function:: mean(data)
 
-   Return the sample arithmetic mean of *data*, a sequence or iterator of
-   real-valued numbers.
+   Return the sample arithmetic mean of *data* which can be a sequence or iterator.
 
    The arithmetic mean is the sum of the data divided by the number of data
    points.  It is commonly called "the average", although it is only one of many
@@ -148,6 +147,7 @@
 
    Return the median (middle value) of numeric data, using the common "mean of
    middle two" method.  If *data* is empty, :exc:`StatisticsError` is raised.
+   *data* can be a sequence or iterator.
 
    The median is a robust measure of central location, and is less affected by
    the presence of outliers in your data.  When the number of data points is
@@ -175,7 +175,7 @@
 .. function:: median_low(data)
 
    Return the low median of numeric data.  If *data* is empty,
-   :exc:`StatisticsError` is raised.
+   :exc:`StatisticsError` is raised.  *data* can be a sequence or iterator.
 
    The low median is always a member of the data set.  When the number of data
    points is odd, the middle value is returned.  When it is even, the smaller of
@@ -195,7 +195,7 @@
 .. function:: median_high(data)
 
    Return the high median of data.  If *data* is empty, :exc:`StatisticsError`
-   is raised.
+   is raised.  *data* can be a sequence or iterator.
 
    The high median is always a member of the data set.  When the number of data
    points is odd, the middle value is returned.  When it is even, the larger of
@@ -216,7 +216,7 @@
 
    Return the median of grouped continuous data, calculated as the 50th
    percentile, using interpolation.  If *data* is empty, :exc:`StatisticsError`
-   is raised.
+   is raised.  *data* can be a sequence or iterator.
 
    .. doctest::
 

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list