summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwarren <warren.weckesser@gmail.com>2021-11-15 14:51:40 -0500
committerwarren <warren.weckesser@gmail.com>2021-11-15 14:51:40 -0500
commit13f98b9cc383da9f87f133d872d3922b52e9ed5b (patch)
treea7da71a38c6c0a66b650836fa2eaf326c0892acc
parenta7e22741d058a4c1c8d6b93facbafdf712806614 (diff)
downloadnumpy-13f98b9cc383da9f87f133d872d3922b52e9ed5b.tar.gz
DOC: random: Fix a comment and example in the multivariate_normal docstring.
The covariance matrix is the identity, so the standard deviation of each component is 1.0.
-rw-r--r--numpy/random/_generator.pyx8
-rw-r--r--numpy/random/mtrand.pyx8
2 files changed, 8 insertions, 8 deletions
diff --git a/numpy/random/_generator.pyx b/numpy/random/_generator.pyx
index 391987a1e..a3cfeaa4a 100644
--- a/numpy/random/_generator.pyx
+++ b/numpy/random/_generator.pyx
@@ -3572,11 +3572,11 @@ cdef class Generator:
>>> y.shape
(3, 3, 2)
- The following is probably true, given that 0.6 is roughly twice the
- standard deviation:
+ The following is probably true, given that 2.0 is twice the standard
+ deviation of the distribution of each component:
- >>> list((x[0,0,:] - mean) < 0.6)
- [True, True] # random
+ >>> list((x[0,0,:] - mean) < 2.0)
+ [True, True] # random
"""
if method not in {'eigh', 'svd', 'cholesky'}:
diff --git a/numpy/random/mtrand.pyx b/numpy/random/mtrand.pyx
index 3e13503d0..ee124fe17 100644
--- a/numpy/random/mtrand.pyx
+++ b/numpy/random/mtrand.pyx
@@ -4079,11 +4079,11 @@ cdef class RandomState:
>>> x.shape
(3, 3, 2)
- The following is probably true, given that 0.6 is roughly twice the
- standard deviation:
+ The following is probably true, given that 2.0 is twice the standard
+ deviation of the distribution of each component:
- >>> list((x[0,0,:] - mean) < 0.6)
- [True, True] # random
+ >>> list((x[0,0,:] - mean) < 2.0)
+ [True, True] # random
"""
from numpy.linalg import svd