[Scipy-tickets] [SciPy] #1123: invgamma frozen rv object appears broken

SciPy Trac scipy-tickets@scipy....
Tue Feb 23 17:43:41 CST 2010


#1123: invgamma frozen rv object appears broken
---------------------------------------------------------------+------------
 Reporter:  arch_o_median                                      |       Owner:  somebody
     Type:  defect                                             |      Status:  new     
 Priority:  normal                                             |   Milestone:  0.8.0   
Component:  scipy.stats                                        |     Version:  0.7.0   
 Keywords:  invgamma inverse gamma pdf parameters shape scale  |  
---------------------------------------------------------------+------------

Comment(by josefpktd):

 the problem is independent of frozen distribution.

 "shape" is not a keyword argument, shape parameters are positional. If
 there is a shape keyword it will be ignored, because of the generic **kwd
 handling.

 So, it might be confusing, but it's not a bug.

 see examples

 {{{
 >>> stats.invgamma.pdf(3,shape=3,scale=3)
 ...
 TypeError: _pdf() takes exactly 3 arguments (2 given)
 >>> stats.invgamma.pdf(3,3,scale=3)
 0.061313240195240377
 >>> stats.invgamma.pdf(3,shapes=3,scale=3)
 Traceback (most recent call last):
 ...
 TypeError: _pdf() takes exactly 3 arguments (2 given)
 >>> stats.invgamma.pdf(10,3,shape=3,scale=3)
 0.0010001045979203186
 >>> stats.invgamma(3,shape=3,scale=3).pdf(10)
 0.0010001045979203186
 >>> stats.invgamma(3,loc=-2, scale=3).pdf(10)
 0.00050703175981211266
 >>> stats.invgamma(3, scale=3).pdf(10)
 0.0010001045979203186


 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1123#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