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

Unable to multiply two triangular sparse matrices #35609

Closed
KlausC opened this issue Apr 27, 2020 · 0 comments · Fixed by #35659
Closed

Unable to multiply two triangular sparse matrices #35609

KlausC opened this issue Apr 27, 2020 · 0 comments · Fixed by #35659
Labels
sparse Sparse arrays

Comments

@KlausC
Copy link
Contributor

KlausC commented Apr 27, 2020

Multiplying two UpperTriangular{SparseMatrixCSC} and friends should return a matrix of the same type.
Computational effort should be approximately 1/4 of sparse multiplication of SparseMatrixCSC.

It throws a Method Error instead.

julia> X = UpperTriangular(sprand(100, 100, 10*1e-2));

julia> X * X
ERROR: MethodError: no method matching lmul!(::UpperTriangular{Float64,SparseMatrixCSC{Float64,Int64}}, ::SparseMatrixCSC{Float64,Int64})
  ...
Stacktrace:
 [1] *(::UpperTriangular{Float64,SparseMatrixCSC{Float64,Int64}}, ::UpperTriangular{Float64,SparseMatrixCSC{Float64,Int64}}) at /home/crusius/julia-1.0.5/share/julia/stdlib/v1.0/LinearAlgebra/src/triangular.jl:1627
@ViralBShah ViralBShah added the sparse Sparse arrays label Apr 27, 2020
StefanKarpinski pushed a commit that referenced this issue Jun 1, 2020
…5659)

* multiplication of sparse triangular matrices
* removed disambiguity and improved test cases
* test cases for `nnz, nzrange, rowvals, nonzeros`
simeonschaub pushed a commit to simeonschaub/julia that referenced this issue Aug 11, 2020
…g#35610 JuliaLang#35642 (JuliaLang#35659)

* multiplication of sparse triangular matrices
* removed disambiguity and improved test cases
* test cases for `nnz, nzrange, rowvals, nonzeros`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sparse Sparse arrays
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants