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

Constructing PDSparsMat from Symmetric{Float64,SparseMatrixCSC{Float64,Int64}} #70

Open
Jan-van-Waaij opened this issue Dec 21, 2017 · 2 comments

Comments

@Jan-van-Waaij
Copy link

Dear all,

Is there a reason why I cannot do the following:

A = sparse([1,2],[1,2],[1.0,1.0])
B = Symmetric(A)
C= PDSparseMat(B)

This gives the following error:

MethodError: Cannot convert an object of type Symmetric{Float64,SparseMatrixCSC{Float64,Int64}} to an object of type PDMats.PDSparseMat

Best wishes,

Jan

@jkbest2
Copy link

jkbest2 commented Jun 12, 2018

This does work for dense matrices, so it might be a good method to add. For now, at least for Julia v0.6 I see the following options work:

C = PDSparseMat(A)
C = PDSparseMat(cholfact(B))

Note that in Julia v0.7+ cholfact becomes chol.

@Jan-van-Waaij
Copy link
Author

Dear jkbest2,

Thanks for the reply! Would be great indeed if there is way to work around it.

Best,

Jan

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

No branches or pull requests

2 participants