nzrange will work but is not as convenient.
So `findnz` converts the matrix to a tuple of arrays (triplet), and it
creates a copy of all data.
So it is not quite what I was looking for. An iterator would be better.
missed that - thank you.
Le mercredi 09 novembre 2016 à 05:37 -0800, Christoph Ortner a écrit :
> Is there as iterator implemented that allows me to iterate over all
> non-zero entries of a sparse matrix or vector? E.g.
>
> for (i, j, z) in nonzeros(A)
>
>
> (I realise that nonzeros does something else!)
As the docs
Is there as iterator implemented that allows me to iterate over all
non-zero entries of a sparse matrix or vector? E.g.
for (i, j, z) in nonzeros(A)
(I realise that nonzeros does something else!)