[Scipy-tickets] [SciPy] #1779: distributions.rbinom.pmf is broken, logpmf seems to work.

SciPy Trac scipy-tickets@scipy....
Sat Nov 24 14:27:00 CST 2012


#1779: distributions.rbinom.pmf is broken, logpmf seems to work.
-------------------------+--------------------------------------------------
 Reporter:  bioinformed  |       Owner:  somebody   
     Type:  defect       |      Status:  new        
 Priority:  high         |   Milestone:  Unscheduled
Component:  scipy.stats  |     Version:  0.11.0     
 Keywords:               |  
-------------------------+--------------------------------------------------
 In the latest !SciPy 0.11:
   >> exp(nbinom(721,0.52).logpmf(700))

   0.006830665154179629

 This matches the results from R:
   > dnbinom(700, size=721, p=0.52)

   [1] 0.006830665

 However, back to !SciPy 0.11:
   >>> nbinom(721,0.52).pmf(700)
   inf

 This is going to cause trouble to anyone following the nice example given
 by the stats models folks:
 http://statsmodels.sourceforge.net/devel/examples/generated/example_gmle.html

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


More information about the Scipy-tickets mailing list