[SciPy-user] How to generate random positive definite matrix

David Cournapeau david at ar.media.kyoto-u.ac.jp
Sun Jun 10 23:32:02 EDT 2007


Hi there,

    I need to generate random positive definite matrix, mainly for 
testing purpose. Before, I was generating them using a random matrix A 
given by randn, and computing A'A. Unfortunately, if A is singular, so 
is A'A. Is there a better way to do than testing whether A is singular ? 
They do not need to follow a specific distribution (but I would like to 
avoid them to follow a really special "pattern").

    cheers,

    David



More information about the SciPy-User mailing list