title: Empirical Distribution Function in Numpy
body: <p>I have the following list of values:</p>
  
  <pre><code>x = [-0.04124324405924407, 0, 0.005249724476788287, 0.03599351958245578, -0.00252785423151014, 0.01007584102031178, -0.002510349639322063,...]
  </code></pre>
  
  <p>and I want to calculate the empirical density function, so I think I need to calculate the empirical cumulative distribution function and I've used this code:</p>
  
  <pre><code>counts = np.asarray(np.bincount(x), dtype=float)
  cdf = counts.cumsum() / counts.sum()
  </code></pre>
  
  <p>and then I calculate this value:</p>
  
  <pre><code>print cdf[0.01007584102031178]
  </code></pre>
  
  <p>and I always get 1  so I guess I made a mistake. Do you know how to fix it?
  Thanks!</p>