Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDMat: convert Matrix type to the same Cholesky type #117

Merged
merged 2 commits into from
Sep 17, 2020

Conversation

mossr
Copy link
Contributor

@mossr mossr commented Aug 12, 2020

This addresses #98 where the original Matrix type (e.g., Matrix{Int}) can differ from the type returned by Cholesky (e.g., Matrix{Float64}). Therefore, we simply convert the Matrix type to the same paremetric types already converted by Cholesky.

Previously, this failed:

PDMat([1 0; 0 1])

This also addresses JuliaStats/Distributions.jl#1004 (where my original problem started).

@andreasnoack
Copy link
Member

Could you please add the example as a test? Then I think this one should be good to go.

@mossr
Copy link
Contributor Author

mossr commented Sep 17, 2020

@andreasnoack Good idea—I've since added this example in pdmtypes.jl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants