title: Read in matrix from file, make edgelist, and write edgelist to file
body: <p>This should be simple, but I can't figure it out. I just need to </p>
  
  <ul>
  <li>read a matrix from a file into Python (that matrix has no headers/row names)</li>
  <li>convert it to an edgelist</li>
  <li>write the edgelist to file</li>
  </ul>
  
  <p>I can do each of these separately, but I don't know how to go from the imported matrix to a graph object in networkx module for example. If I was able to convert to a networkx graph, then I can make an edgelist and write to file. </p>
  
  <p>An example of a matrix to read in (its saved in .txt file)</p>
  
  <pre><code>1 0 1 0 1
  1 0 1 0 0
  1 0 1 0 1
  0 0 1 0 0
  1 1 1 1 0
  1 1 1 0 1
  1 0 1 0 0
  </code></pre>