[Scipy-tickets] [SciPy] #934: distributions moment doesn't call argcheck

SciPy Trac scipy-tickets@scipy....
Fri Jan 14 19:49:13 CST 2011


#934: distributions moment doesn't call argcheck
-------------------------+--------------------------------------------------
 Reporter:  josefpktd    |       Owner:  josefpktd
     Type:  defect       |      Status:  new      
 Priority:  normal       |   Milestone:  0.9.0    
Component:  scipy.stats  |     Version:  0.7.0    
 Keywords:               |  
-------------------------+--------------------------------------------------

Comment(by josefpktd):

 fixed for continuous distributions in changeset:7032

 but discrete distributions have the same problem and return incorrect
 results

 {{{
 >>> stats.poisson.stats(-2)
 (array(1.#QNAN), array(1.#QNAN))
 >>> stats.poisson.moment(2,-2)
 2
 >>> stats.poisson.moment(1,-2)
 -2
 >>> stats.poisson._argcheck(-2)
 0
 >>> stats.poisson._argcheck(2)
 1

 >>> stats.binom.moment(2,-2,0.5)
 0.5
 >>> stats.binom.moment(2,-2,-0.5)
 2.5
 >>> stats.binom._argcheck(-2,-0.5)
 False
 }}}

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


More information about the Scipy-tickets mailing list