Using PDMats

Are there any examples of using the package PDMats? For example, how can I find the inverse of a symmetric positive definite matrix?

1 Like

The best place to start is the package README, then the sources (which show that methods are defined for Base.inv), so you can just

using PDMats
A = randn(4,4)
B = PDMat(A*A')
inv(B)

That said, are you sure you need an inverse? If you are solving a linear system, you can do it directly with \.

Thank you. I do need to calculate variance-covariance matrices.

This package is awesome. Thank you for posting a question about it so that I could learn it exists!

You are welcome!