[Scipy-tickets] [SciPy] #1814: TypeError for gamma.pdf

SciPy Trac scipy-tickets@scipy....
Mon Jan 14 20:03:17 CST 2013


#1814: TypeError for gamma.pdf
-----------------------------+----------------------------------------------
 Reporter:  chrisfonnesbeck  |       Owner:  somebody   
     Type:  defect           |      Status:  new        
 Priority:  normal           |   Milestone:  Unscheduled
Component:  Other            |     Version:  devel      
 Keywords:                   |  
-----------------------------+----------------------------------------------
 The pdf method for the gamma distribution is broken. If you pass 3
 arguments, it asks for 2; if you pass 2 arguments, it asks for 3. The
 example in the docs does not work. For example:


 {{{
 rv = gamma(3., loc = 0., scale = 2.)
 x = np.linspace(0,5,10)
 rv.pdf(x, 3)
 }}}

 yields the following:


 {{{

 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)
 <ipython-input-89-cbc99d607b17> in <module>()
       1 rv = gamma(3., loc = 0., scale = 2.)
       2 x = np.linspace(0,5,10)
 ----> 3 rv.pdf(x, 3)

 TypeError: pdf() takes exactly 2 arguments (3 given)

 }}}

 Working from 0.12.0.dev-b69fe18 on OSX 10.8.2 and Python 2.7.2.

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


More information about the Scipy-tickets mailing list