-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
similar(::SparseMatrixCSC) waste of memory #26560
Comments
Seems reasonable. On 0.6, |
Yes! The case without dimensions also copies (in v0.6 and v0.7) the |
If memory serves this aspect of |
My argument is the inaccessibility of the retained space in |
I think it would be perfectly fine for |
If there is a problem of avoiding reallocation, then maybe a way of having the best of both worlds would be just to |
When calling
similar
for a sparse matrix, the produced sparse matrix contains uninitialized memory, which is not accessible by the defined user interface.The size of fields
rowval
andnzval
is identical to the corresponding fields in the source. The only way to use those entries is by modification ofcolptr
, which is not a documented user interface.I propose to reduce the length of those arrays to
colptr[end]-1
of the new matrix.This behaviour is new in v0.7 and maybe a regression.
The text was updated successfully, but these errors were encountered: