[Scipy-tickets] [SciPy] #1164: invalid index in linregress with one array

SciPy Trac scipy-tickets@scipy....
Thu Apr 22 12:10:26 CDT 2010


#1164: invalid index in linregress with one array
--------------------+-------------------------------------------------------
 Reporter:  gjc     |       Owner:  somebody
     Type:  defect  |      Status:  new     
 Priority:  normal  |   Milestone:  0.8.0   
Component:  Other   |     Version:  0.7.0   
 Keywords:          |  
--------------------+-------------------------------------------------------
 This works:
 {{{
 In [19]: linregress([0, 1], [1, -3])
 Out[19]: (-4.0, 1.0, -1.0, nan, nan)
 }}}
 This doesn't work; why?
 {{{
 In [20]: linregress([0, 1, 1, -3])
 ---------------------------------------------------------------------------
 IndexError                                Traceback (most recent call
 last)

 /home/gjc/projects/ns/ns-3-wmrp/wimetronet/<ipython console> in <module>()

 /usr/lib/python2.6/dist-packages/scipy/stats/stats.pyc in
 linregress(*args)
    1775             y = args[1]
    1776         else:
 -> 1777             x = args[:,0]
    1778             y = args[:,1]
    1779     else:

 IndexError: invalid index
 }}}

 {{{
 In [22]: scipy.__version__
 Out[22]: '0.7.0'
 }}}

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


More information about the Scipy-tickets mailing list