title: python sum all previous values in array at each index
body: <p>I have an array:</p>
  
  <pre><code>my_array = [1, 4, 1, 13, 9]
  </code></pre>
  
  <p>and would like to create a new array that for each index in my_array is the sum of all the previous index values</p>
  
  <pre><code>summed_array = [0, 1, 5, 6, 19]
  </code></pre>
  
  <p>I tried something like</p>
  
  <pre><code>for ind,i in enumerate(my_array):
      print i, my_array[ind-1]
  </code></pre>
  
  <p>but can't figure out how to get the summation over all previous values.</p>