title: Sci-kit Learn KDE variance increases by one
body: <p>I'm trying to fit a kernel density estimate for some normal data with sklearn's kde. Here's an example:</p>
  
  <pre><code>import numpy as np
  from sklearn.neighbors.kde import KernelDensity as kde
  
  x = np.random.normal(scale = 2, size = [10000, 1])
  np.var(x) # 4.0
  test_kde = kde()
  test_kde.fit(x)
  
  np.var(test_kde.sample(10000)) # 5.0
  </code></pre>
  
  <p>The variance increases by one. Am I doing something incredibly stupid here?</p>