[Scipy-tickets] [SciPy] #1628: stats.gamma.pdf(0, 1) returns nan, but it should be 1.

SciPy Trac scipy-tickets@scipy....
Sat Mar 24 23:07:20 CDT 2012


#1628: stats.gamma.pdf(0, 1) returns nan, but it should be 1.
------------------------------+---------------------------------------------
 Reporter:  warren.weckesser  |       Owner:  somebody   
     Type:  defect            |      Status:  new        
 Priority:  normal            |   Milestone:  Unscheduled
Component:  scipy.stats       |     Version:  devel      
 Keywords:  gamma             |  
------------------------------+---------------------------------------------

Comment(by josefpktd):

 duplicate, special case of ticket:1326

 I'm waiting for a generic solution, see
 https://github.com/scipy/scipy/pull/5

 My quick solution was to add 1e-300 to force 0log0=0 without having to
 check for the degenerate case.

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


More information about the Scipy-tickets mailing list