title: Probability density function numpy histogram/scipy stats
body: <p>We have the array<code>a=range(10)</code>. Using <code>numpy.histogram</code>:</p>
  
  <pre><code>hist,bins=numpy.histogram(a,bins=(np.max(a)-np.min(a))/1, range=np.min(a),np.max(a)),density=True)
  </code></pre>
  
  <p>According to numpy tutorial: </p>
  
  <blockquote>
    <p>If density=True, the result is the value of the probability density function at the bin, normalized such that the integral over the range is 1.</p>
  </blockquote>
  
  <p>The result is:  </p>
  
  <pre><code>array([ 0.1,  0.1,  0.1,  0.1,  0.1,  0.1,  0.1,  0.1,  0.2])
  </code></pre>
  
  <p>I try to do the same using <code>scipy.stats</code>:</p>
  
  <pre><code>mean = np.mean(a)
  sigma = np.std(a)
  norm.pdf(a, mean, sigma)
  </code></pre>
  
  <p>However the result is different:</p>
  
  <pre><code>array([ 0.04070852,  0.06610774,  0.09509936,  0.12118842,  0.13680528,0.13680528,  0.12118842,  0.09509936,  0.06610774,  0.04070852])
  </code></pre>
  
  <p>I want to know why.</p>
  
  <p><strong>Update</strong>:I would like to set a more general question. How can we have the probability density function of an array without using <code>numpy.histogram</code> for <code>density=True</code> ?</p>