[Scipy-tickets] [SciPy] #1276: stats distributions domain error in beta._fitstart

SciPy Trac scipy-tickets@scipy....
Sat Sep 11 23:31:15 CDT 2010


#1276: stats distributions domain error in beta._fitstart
-------------------------+--------------------------------------------------
 Reporter:  josefpktd    |       Owner:  somebody
     Type:  defect       |      Status:  new     
 Priority:  normal       |   Milestone:  0.9.0   
Component:  scipy.stats  |     Version:  0.7.0   
 Keywords:               |  
-------------------------+--------------------------------------------------
 {{{
 File "C:\...\scipy-0.9.0.dev6579.win32\Programs\Python25\Lib\site-
 packages\scipy\stats\distributions.py", line 1975, in func
     sk = 2*(b-a)*math.sqrt(a + b + 1) / (a + b + 2) / math.sqrt(a*b)
 ValueError: math domain error
 }}}

 math is too fragile, compared to numpy

 {{{
 1986  a, b = x
 1987  sk = 2*(b-a)*math.sqrt(a + b + 1) / (a + b + 2) / math.sqrt(a*b)
 }}}

 does this make sense, it looks like sk is always zero

 As a sidenote: it seems _fitstart needs to return a tuple not an array (+
 is concatenation not summing)

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


More information about the Scipy-tickets mailing list