[Scipy-tickets] [SciPy] #1882: Computing variance of non-central t-distribution gives error

SciPy Trac scipy-tickets@scipy....
Fri Mar 29 10:54:49 CDT 2013


#1882: Computing variance of non-central t-distribution gives error
--------------------+-------------------------------------------------------
 Reporter:  Sytse   |       Owner:  somebody   
     Type:  defect  |      Status:  new        
 Priority:  normal  |   Milestone:  Unscheduled
Component:  Other   |     Version:  0.11.0     
 Keywords:          |  
--------------------+-------------------------------------------------------

Comment(by josefpktd):

 Yes, increasing the indent looks right to me
 we only need mu, if we don't have mu2 already given

 .var calls .stats with only "v" in the moments, which doesn't work in this
 case

 minimal example/test case:

 {{{
 >>> stats.nct.stats(10,1, moments='v')
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "C:\Python26\lib\site-packages\scipy\stats\distributions.py", line
 1489, in stats
     if np.isinf(mu):
 TypeError: function not supported for these types, and can't coerce safely
 to supported types

 >>> stats.nct.stats(10,1, moments='mv')
 (array(1.0837223079391438), array(1.3255459592750558))
 }}}

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