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

Constraints list of a zonotope whose generator is a subarray fails #1497

Closed
mforets opened this issue Jul 4, 2019 · 1 comment · Fixed by #1498
Closed

Constraints list of a zonotope whose generator is a subarray fails #1497

mforets opened this issue Jul 4, 2019 · 1 comment · Fixed by #1498
Assignees
Labels
bug 🐛 Something isn't working

Comments

@mforets
Copy link
Member

mforets commented Jul 4, 2019

julia> A = sprandn(2, 10, 0.4);

julia> constraints_list(Zonotope(rand(2), view(A, :, :)))
ERROR: MethodError: no method matching svdvals!(::SparseMatrixCSC{Float64,Int64})
Closest candidates are:
@mforets mforets added the bug 🐛 Something isn't working label Jul 4, 2019
@schillic
Copy link
Member

schillic commented Jul 4, 2019

LinearAlgebra.rank(M::SubArray{N, 2, <:SparseMatrixCSC}) where {N} = rank(qr(M))

does not fix the problem:

ERROR: MethodError: no method matching qr!(::SparseMatrixCSC{Float64,Int64})

By converting the matrix, we could do:

LinearAlgebra.rank(M::SubArray{N, 2, <:SparseMatrixCSC}) where {N} = rank(sparse(M))

@schillic schillic self-assigned this Jul 4, 2019
mforets pushed a commit that referenced this issue Jul 4, 2019
* define rank for sparse submatrix

* unit test for rank
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants