PDMats.jl icon indicating copy to clipboard operation
PDMats.jl copied to clipboard

Positivity check in PDiagMat and ScalMat constructors?

Open dmbates opened this issue 10 years ago • 1 comments

At present there is no check for positivity of the arguments that will be on the diagonal of a PDiagMat or ScalMat. Probably a good idea to check that.

julia> using PDMats

julia> ScalMat(4,-1.5)
ScalMat(4,-1.5,-0.6666666666666666)

julia> PDiagMat([-1.,2.,-3.,4.])
PDiagMat(4,[-1.0,2.0,-3.0,4.0],[-1.0,0.5,-0.333333,0.25])

dmbates avatar Apr 13 '15 18:04 dmbates

I think we need this. In particular now that we've also defined isposdef in https://github.com/JuliaStats/PDMats.jl/pull/123.

andreasnoack avatar Nov 04 '21 08:11 andreasnoack