Getting all set values of a sparse matrix

Using the sparse array example:

julia> using SparseArrays

julia> A = sparse([1, 2, 3], [1, 2, 3], [0, 2, 0])
3×3 SparseMatrixCSC{Int64,Int64} with 3 stored entries:
  [1, 1]  =  0
  [2, 2]  =  2
  [3, 3]  =  0

How can I get all the pairs that are set even though the value may be 0, i.e (1,1), (2,2), (3,3)?

See ?findnz:

julia> I, J, V = findnz(A)
([1, 2, 3], [1, 2, 3], [0, 2, 0])
2 Likes