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

Conversion from SparseMatrixCSC of VariableRef to Matrix #1275

Closed
blegat opened this issue May 7, 2018 · 0 comments · Fixed by #1274
Closed

Conversion from SparseMatrixCSC of VariableRef to Matrix #1275

blegat opened this issue May 7, 2018 · 0 comments · Fixed by #1274

Comments

@blegat
Copy link
Member

blegat commented May 7, 2018

Conversion from SpaseMatrixCSC to Matrix fails if the eltype is VariableRef since it calls zeros(::VariableRef, ...) which tries to store zero(::VariableRef) (of type AffExpr) into a matrix of VariableRef.

m = Model()
@variable m x
S = sparse([1, 2], [1, 2], [x, x])
Matrix(S) # fails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant