JuliaStats / PDMats.jl

Uniform Interface for positive definite matrices of various structures
Other
104 stars 43 forks source link

Unifying constructor? e.g. PDMat(Diagonal(...)) = PDiagMat(diag(...)) #136

Closed st-- closed 1 year ago

st-- commented 3 years ago

Would be really helpful in downstream code if I wouldn't have to think whether I've got a Diagonal -> wrap in PDiagMat or not -> wrap in PDMat. How about

PDMat(mat::Diagonal) = PDiagMat(diag(mat))

for example?