[Scipy-tickets] [SciPy] #1530: Cauchy fit returns nothing in scipy 0.9.0

SciPy Trac scipy-tickets@scipy....
Sat Oct 8 09:41:10 CDT 2011


#1530: Cauchy fit returns nothing in scipy 0.9.0
------------------------------+---------------------------------------------
 Reporter:  gtg944q           |       Owner:  somebody   
     Type:  defect            |      Status:  new        
 Priority:  normal            |   Milestone:  Unscheduled
Component:  scipy.stats       |     Version:  0.9.0      
 Keywords:  cauchy fit stats  |  
------------------------------+---------------------------------------------

Comment(by josefpktd):

 as a consequence fit_loc_scale and _fitstart don't make sense for t(df=1),
 they get scale=0, but optimize.fmin doesn't seem to mind:


 {{{
 >>> stats.t.stats(1)
 (array(0.0), array(inf))
 >>> stats.t._stats(1)
 (0, array(inf), array(nan), array(nan))

 >>> stats.t.fit_loc_scale(x, 1)
 (0.59813908152019735, 0.0)

 >>> stats.t._fitstart(x, 1)
 Traceback (most recent call last):
   File "<pyshell#37>", line 1, in <module>
     stats.t._fitstart(x, 1)
   File "C:\Python26\lib\site-packages\scipy\stats\distributions.py", line
 1614, in _fitstart
     return args + self.fit_loc_scale(data, *args)
 TypeError: fit_loc_scale() argument after * must be a sequence, not int
 >>> stats.t._fitstart(x, [1])
 Traceback (most recent call last):
   File "<pyshell#38>", line 1, in <module>
     stats.t._fitstart(x, [1])
   File "C:\Python26\lib\site-packages\scipy\stats\distributions.py", line
 1614, in _fitstart
     return args + self.fit_loc_scale(data, *args)
 TypeError: can only concatenate list (not "tuple") to list

 >>> stats.t._fitstart(x, (1,))
 (1, 0.59813908152019735, 0.0)

 }}}

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


More information about the Scipy-tickets mailing list