[Numpy-discussion] Behavior of np.random.multivariate_normal with bad covariance matrices
blake.a.griffith at gmail.com
Sun Mar 29 19:39:00 EDT 2015
I have an open PR which lets users control the checks on the input
covariance matrix. The matrix is required to be symmetric and positve
semi-definite (PSD). The current behavior is that NumPy raises a warning if
the matrix is not PSD, and does not even check for symmetry.
I added a symmetry check, which raises a warning when the input is not
symmetric. And added two keyword args which users can use to turn off the
checks/warnings when the matrix is ill formed. So this would only cause
another new warning to be raised in existing code.
This is needed because sometimes the covariance matrix is only *almost*
symmetric or PSD due to roundoff error.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion