[Scipy-tickets] [SciPy] #1326: chi2.pdf erroneous value at x=0.0 df=2

SciPy Trac scipy-tickets@scipy....
Sat Oct 15 15:41:32 CDT 2011


#1326: chi2.pdf erroneous value at x=0.0 df=2
-------------------------+--------------------------------------------------
 Reporter:  tpikonen     |       Owner:  somebody   
     Type:  defect       |      Status:  new        
 Priority:  normal       |   Milestone:  Unscheduled
Component:  scipy.stats  |     Version:  devel      
 Keywords:  chi2 pdf     |  
-------------------------+--------------------------------------------------
Changes (by josefpktd):

  * status:  needs_review => new


Comment:

 another case: beta distribution

 0log0 if a=1 and x=0 or b=1 and x is 1


 bug in scipy 0.9:

 {{{
 >>> stats.beta._logpdf(1e-300, 1, 0.5)
 -0.69314718055994529
 >>> stats.beta._logpdf(0, 1, 0.5)
 nan
 >>> np.log(stats.beta._pdf(0, 1, 0.5))
 -0.69314718055994529

 >>> stats.beta._logpdf(1, 0.5, 1)
 nan
 >>> np.log(stats.beta._pdf(1, 0.5, 1))
 -0.69314718055994529

 }}}

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


More information about the Scipy-tickets mailing list