title: Creating dictionary from numpy array
body: <p>I have an numpy array and I want to create a dictionary from the array. </p>
  
  <p>More specifically I want a dictionary that has keys that correspond to the row, so key 1 should be the sum of row 1.</p>
  
  <p>s1 is my array and I know how to get the sum of the row but doing <code>numpy.sum(s1[i])</code>, where i is the row.</p>
  
  <p>I was thinking of creating a loop where I can compute the sum of the row and then add it to a dictionary but I am new to programming so I am not sure how to do this or if it is possible. </p>
  
  <p>Does anybody have any suggestions?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I created the key values with the range function.
  Then zipped the keys and the array.</p>
  
  <pre><code>mydict = dict(zip(keys, s1))
  </code></pre>