diff options
author | Max Balandat <balandat@fb.com> | 2020-03-30 19:24:03 -0700 |
---|---|---|
committer | Max Balandat <balandat@fb.com> | 2020-04-04 18:27:31 -0700 |
commit | 72457f01832d10c72a1839aafc178cf4f53449cb (patch) | |
tree | 8872abe06a6f860e4f9099795ee9900cb66683b4 /numpy/random/_generator.pyx | |
parent | f0a74b2d4e50a1b4f9d9189c6b2e31b920913a8b (diff) | |
download | numpy-72457f01832d10c72a1839aafc178cf4f53449cb.tar.gz |
Bug: Fix eigh mnd cholesky methods of numpy.random.multivariate_normal
Fixes #15871
Diffstat (limited to 'numpy/random/_generator.pyx')
-rw-r--r-- | numpy/random/_generator.pyx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/numpy/random/_generator.pyx b/numpy/random/_generator.pyx index 7766f8b8c..6b8a2f70b 100644 --- a/numpy/random/_generator.pyx +++ b/numpy/random/_generator.pyx @@ -3537,10 +3537,9 @@ cdef class Generator: # approximately zero or when the covariance is not positive-semidefinite _factor = u * np.sqrt(abs(s)) else: - _factor = np.sqrt(s)[:, None] * vh + _factor = u * np.sqrt(s) - x = np.dot(x, _factor) - x += mean + x = mean + x @ _factor.T x.shape = tuple(final_shape) return x |