title: Numeric integration in numpy
body: <p>I want to do something quite simple but I'm unable to find it in the depths of <code>numpy</code>.  I want to numerically and continuously integrate a function given by its values (<em>not</em> by its formula!).  That means I simply want an array which holds the sums of the beginning of the input array.  Example:</p>
  
  <p>Input:</p>
  
  <pre><code>[ 4, 3, 5, 8 ]
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>[ 4, 7, 12, 20 ]  # [ sum(i[0:1]), sum(i[0:2]), sum(i[0:3]), sum(i[0:4]) ]
  </code></pre>
  
  <p>Sounds pretty straight forward, so I'm hopeful this must be easy with some <code>numpy</code> functionality I'm currently unable to find.</p>
  
  <p>I found stuff like <code>scipy.integrate.quad()</code> but that seems to integrate over a given range (from a to b) and the returns a single value.  I need an array as output.</p>