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

Fix too optimistic definitions of `*` and `/` with scalars

Open devmotion opened this issue 1 year ago • 0 comments

The definitions of * and / for pd matrices are too optimistic: In general, the resulting matrix is not pd (or psd) anymore, so we should not return a pd matrix type (which currently - at least some of them - do not even check positive definiteness at construction!).

If a pd matrix type is desired, then I guess either one should use a dedicated function or encode in the type domain of the scalar that it is positive (or at least non-negative).

Ref #201.

devmotion avatar Jun 12 '24 22:06 devmotion