title: Storing a Sparse Numpy Array
body: <p>I have a 20,000 x 20,000 Numpy matrix that I wish to store by file, where the average volumn only has 12 values in it.</p>
  <p>What would be the most efficient way to store only the values in the format of</p>
  <pre><code>if array[i][j] == 1:
     file.write(&quot;{} {} {{}}\n&quot;.format(i, j)
  </code></pre>
  <p>where (i, j) are the indices for the array?</p>