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

SciPy Trac scipy-tickets@scipy....
Fri Jan 14 20:33:42 CST 2011


#1276: stats distributions domain error in beta._fitstart
--------------------------+-------------------------------------------------
  Reporter:  josefpktd    |       Owner:  somebody
      Type:  defect       |      Status:  closed  
  Priority:  normal       |   Milestone:  0.9.0   
 Component:  scipy.stats  |     Version:  0.7.0   
Resolution:  fixed        |    Keywords:          
--------------------------+-------------------------------------------------
Changes (by josefpktd):

  * status:  new => closed
  * resolution:  => fixed


Old description:

> {{{
> 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)

New description:

 {{{
 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


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

--

Comment:

 I don't see any other problem, closing  (removing irrelevant comment from
 description)

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


More information about the Scipy-tickets mailing list