[SciPy-user] gaussian_kde broken?

Flavio Coelho fccoelho at gmail.com
Tue Oct 3 13:59:07 CDT 2006


Thanks Robert!!

Now, which one should I update to SVN numpy or scipy?

Thanks again!

Flávio

On 10/3/06, Robert Kern <robert.kern at gmail.com> wrote:
>
> Flavio Coelho wrote:
> > Hi,
> >
> > I noticed a new bug in the combination Numpy1.0rc1/Scipy0.5.1:
> >
> > #generate a sample from a normal distribution:
> > a=normal(0,1,10000)
> > from scipy.stats.kde import gaussian_kde as kde
> > d=kde(a)
> > d.evaluate (arange(-1,1,0.1))
> >
> ---------------------------------------------------------------------------
> > exceptions.TypeError                                 Traceback (most
> > recent call last)
> >
> > /home/fccoelho/Documents/Papers/YFgame/<console>
> >
> > /usr/lib/python2.4/site-packages/scipy/stats/kde.py in evaluate(self,
> > points)
> >     116                 diff = self.dataset - points[:,i,newaxis]
> >     117                 tdiff = dot(self.inv_cov, diff)
> > --> 118                 energy = sum(diff*tdiff,axis=0)/2.0
> >     119                 result[i] = sum(exp(-energy),axis=0)
> >     120
> >
> > TypeError: sum() takes no keyword arguments
> >
> > Are there any fixes available for this?
>
> It's been fixed in SVN for a while now.
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless
> enigma
>   that is made terrible by our own mad attempt to interpret it as though
> it had
>   an underlying truth."
>    -- Umberto Eco
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>



-- 
Flávio Codeço Coelho
registered Linux user # 386432
---------------------------
"Laws are like sausages. It's better not to see them being made."
Otto von Bismark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20061003/dfccc0aa/attachment.html 


More information about the SciPy-user mailing list