title: How to get the cumulative distribution function with NumPy?
body: <p>I want to create a CDF with NumPy, my code is the next:</p>
  
  <pre><code>histo = np.zeros(4096, dtype = np.int32)
  for x in range(0, width):
     for y in range(0, height):
        histo[data[x][y]] += 1
        q = 0 
     cdf = list()
     for i in histo:
        q = q + i
        cdf.append(q)
  </code></pre>
  
  <p>I am walking by the array but take a long time the program execution. There is a built function with this feature, isn't?</p>