title: How to iterate over the non-zero values of a sparse array
body: <p>I have a sparse array in Julia and would like to iterate over its non-zero entries. What's a good way of doing this?</p>
  
  <p>So far, I have:</p>
  
  <pre><code>using SparseArrays
  
  a = sprandn(20,20,0.3)
  
  for (x,y,v) in a
    print(x,y,v)
  end
  </code></pre>