diff options
author | Warren Weckesser <warren.weckesser@gmail.com> | 2019-11-30 21:59:19 -0500 |
---|---|---|
committer | Warren Weckesser <warren.weckesser@gmail.com> | 2019-11-30 21:59:42 -0500 |
commit | e6d1cc2c01a1ce10af7383c3d2abbc7610fb6220 (patch) | |
tree | 68d06e9cf07aa7a409bcee183ca52ab8d220a3e1 /numpy/lib/function_base.py | |
parent | ddcd07546b0ef303e9d19f3dec2d2c9d51a03d0a (diff) | |
download | numpy-e6d1cc2c01a1ce10af7383c3d2abbc7610fb6220.tar.gz |
DOC: lib: Use a clearer example of ddof in the notes of the cov docstring.
Use `ddof = 1` instead of 9, and remove a confusing comment.
Closes gh-15010.
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 3ad630a7d..499120630 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -2305,7 +2305,7 @@ def cov(m, y=None, rowvar=True, bias=False, ddof=None, fweights=None, >>> m = np.arange(10, dtype=np.float64) >>> f = np.arange(10) * 2 >>> a = np.arange(10) ** 2. - >>> ddof = 9 # N - 1 + >>> ddof = 1 >>> w = f * a >>> v1 = np.sum(w) >>> v2 = np.sum(w * a) |