[Scipy-tickets] [SciPy] #1705: little bug in scipy.stats.gaussian_kde

SciPy Trac scipy-tickets@scipy....
Fri Jul 20 10:14:32 CDT 2012

#1705: little bug in scipy.stats.gaussian_kde
 Reporter:  ale.fener    |       Owner:  somebody   
     Type:  defect       |      Status:  new        
 Priority:  normal       |   Milestone:  Unscheduled
Component:  scipy.stats  |     Version:  0.10.0     
 Keywords:               |  
 Hi all.
 I was using the class gaussian_kde with a similar code snippet:

 density = gaussian_kde(data)
 xs = numpy.linspace(xmin, xmax, 2*len(data))
 ys = density(xs)

 the problem is that when data is an array of integers (dunno if it was a
 numpy array of ints or a python array of ints) then the array ys contains
 only zeros. There must be a division by an integer somewhere. Converting
 data to an array of floats solves the problem, but it took me quite some
 time to understand what was going on.

Ticket URL: <http://projects.scipy.org/scipy/ticket/1705>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.

More information about the Scipy-tickets mailing list