-
-
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
nnz and nonzeros change #6761
Comments
Yes, it's by design. If you search for The problem is that some operations might store zeros in a sparse matrix and there will be two reasonable behaviours of |
Perhaps we need better documentation of this. I am marking this as a doc issue for 0.3. |
The fact that sparse matrices have been broken to no longer compute |
I should add that while |
Except for many algorithm implementations that deal with sparse matrices at more than a superficial level, the representation details are the most important part. Matlab's sparse matrices are broken for many purposes and require hacky slow workarounds due to not allowing explicit zeros. This is a separate question from the naming of the functions (or improving the docs to fully clarify the distinction), but I don't see any way to retain constant-time |
That's fine with me; I will leave the design to the sparse matrix experts. We can keep the way it works now, but should bring back |
Although I never liked it, I am seriously contemplating having a flag for stored zeros. |
Same as #6769. Closing this one. |
I'm no expert, but I'm seconding @tkelman's point. I have a reasonably large chunk of Matlab code which needs to iteratively zero-out elements of a sparse matrix. I basically ended up developing my own sparse matrix representation (as a struct array, one per row or column) because Matlab's sparse matrices were completely useless for this kind of problem. |
It seems that in the new version nnz was replaced with coutnz and that nonzeros is not working.
Is this by design?
The text was updated successfully, but these errors were encountered: