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

No matrix operations for sub(SparseMatrixCSC, ..., ...)? #15355

Closed
pkofod opened this issue Mar 4, 2016 · 3 comments
Closed

No matrix operations for sub(SparseMatrixCSC, ..., ...)? #15355

pkofod opened this issue Mar 4, 2016 · 3 comments
Labels
sparse Sparse arrays

Comments

@pkofod
Copy link
Contributor

pkofod commented Mar 4, 2016

Working on #15354 I realized that

A = rand(10, 10)
sA = sub(A, 1:10, 1:10)
sA'

works, but

As = sprand(10, 10, 0.3)
sAs = sub(As, 1:10, 1:10)
sAs'

does not. I would love to fix it, but I am wondering what the preferred way would be. Should I add a method in linalg/abstractsparse.jl, or?

Of course A' and As' works, but sA' seems to be redirected to the correct ctranspose, while sAs' does not get dispatched to the sparse method.

Edit: So I just realized that this goes for all matrix operations on subs of sparse matrices. Is this intentional? @andreasnoack

@tkelman tkelman added the sparse Sparse arrays label Mar 4, 2016
@pkofod pkofod changed the title No ctranspose for sub(SparseMatrixCSC) No matrix operations for sub(SparseMatrixCSC, ..., ...)? Mar 4, 2016
@simonster
Copy link
Member

Related to #14398

@pkofod
Copy link
Contributor Author

pkofod commented Mar 5, 2016

Seems both related, and a duplicate, thanks for the ref.

@pkofod pkofod closed this as completed Mar 5, 2016
@timholy
Copy link
Sponsor Member

timholy commented Mar 5, 2016

Coincidentally, I inadvertently fixed this in #15367.

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

No branches or pull requests

4 participants