-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Column slices of sparse matrices should be sparse vectors #6479
Comments
? |
Hello Jiahao, Accidentally my finger slipped when I was in the process of typing, sorry I fixed the issue description. Thanks, On Wed, Apr 9, 2014 at 5:03 PM, Jiahao Chen notifications@github.comwrote:
|
What you see is correct, the slice of the sparse 7x7 matrix is a sparse 1x7 respective 7x1 matrix and all the elements in the slice are by definition in its first row respective column. |
There is a small inconsistency though that column slices of sparse matrices are column matrices and column slices of matrices are vectors. |
Maybe that's another argument for not dropping dimensions by default... |
Exactly, besides that see the |
The problem is that Julia currently doesn't support sparse vectors. ( |
We can support sparse vectors for consistency with the rest of the codebase. So far, I have just been lazy about it - especially since it would be a fair amount of work to make the slightly different data structure work seamlessly all operators and such. Much less attention has been paid to the consistency of sparse operations. I am going to dive into this again. Perhaps we should have a |
That said, we certainly do not have N-d sparse objects, although we probably should, with sorted N-tuple indices and values. I am sure there is an old issue for this somewhere. |
The coordinate representation is probably the easiest thing to support beyond rank 2, but we'd have to also support transformations between that and the CSC representation. I do think it's high time we tracked all the sparse array stuff. |
closed by #13440 |
Dear developers,
For the matrix created with
The output for the slice operations are:
and
I.e. it prints
1
instead of2
.Thanks
The text was updated successfully, but these errors were encountered: