In https://github.com/JuliaLang/julia/pull/38315#issuecomment-722623188 I suggested iterating over nonzero values as a possible efficient generic constructor for SparseMatrix
I then proceed to realize that there isn’t such a function that works generically. SparseArrays
has findnz
, but it only seems to be defined for SparseMatrixCSC
and SparseVector
. Why is this? This feels like it would be a really useful method to have for generic structured arrays.
2 Likes