aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymond Hettinger <rhettinger@users.noreply.github.com>2021-02-07 16:44:42 -0800
committerGitHub <noreply@github.com>2021-02-07 16:44:42 -0800
commit30a8b2839646c849371c7f8411132571cd8bf17c (patch)
tree9d72d4de0e23a2677b363efe6a16747c00ce70a0
parentbpo-43149: Improve error message for exception group without parentheses (GH-... (diff)
downloadcpython-30a8b2839646c849371c7f8411132571cd8bf17c.tar.gz
cpython-30a8b2839646c849371c7f8411132571cd8bf17c.tar.bz2
cpython-30a8b2839646c849371c7f8411132571cd8bf17c.zip
bpo-43147: Remove archaic terminology. (GH-24462)
-rw-r--r--Doc/library/statistics.rst11
-rw-r--r--Lib/statistics.py7
2 files changed, 8 insertions, 10 deletions
diff --git a/Doc/library/statistics.rst b/Doc/library/statistics.rst
index 51b5e9c404c..6b6d3154a28 100644
--- a/Doc/library/statistics.rst
+++ b/Doc/library/statistics.rst
@@ -162,15 +162,14 @@ However, for reading convenience, most of the examples show sorted sequences.
real-valued numbers. If *weights* is omitted or *None*, then
equal weighting is assumed.
- The harmonic mean, sometimes called the subcontrary mean, is the
- reciprocal of the arithmetic :func:`mean` of the reciprocals of the
- data. For example, the harmonic mean of three values *a*, *b* and *c*
- will be equivalent to ``3/(1/a + 1/b + 1/c)``. If one of the values
- is zero, the result will be zero.
+ The harmonic mean is the reciprocal of the arithmetic :func:`mean` of the
+ reciprocals of the data. For example, the harmonic mean of three values *a*,
+ *b* and *c* will be equivalent to ``3/(1/a + 1/b + 1/c)``. If one of the
+ values is zero, the result will be zero.
The harmonic mean is a type of average, a measure of the central
location of the data. It is often appropriate when averaging
- rates or ratios, for example speeds.
+ ratios or rates, for example speeds.
Suppose a car travels 10 km at 40 km/hr, then another 10 km at 60 km/hr.
What is the average speed?
diff --git a/Lib/statistics.py b/Lib/statistics.py
index 4b054b96114..2414869a7e6 100644
--- a/Lib/statistics.py
+++ b/Lib/statistics.py
@@ -367,10 +367,9 @@ def geometric_mean(data):
def harmonic_mean(data, weights=None):
"""Return the harmonic mean of data.
- The harmonic mean, sometimes called the subcontrary mean, is the
- reciprocal of the arithmetic mean of the reciprocals of the data,
- and is often appropriate when averaging quantities which are rates
- or ratios, for example speeds.
+ The harmonic mean is the reciprocal of the arithmetic mean of the
+ reciprocals of the data. It can be used for averaging ratios or
+ rates, for example speeds.
Suppose a car travels 40 km/hr for 5 km and then speeds-up to
60 km/hr for another 5 km. What is the average speed?