running script error (eigen symmetric)

Sean Farley sean.michael.farley at gmail.com
Mon Dec 17 13:50:12 PST 2012


On Mon, Dec 17, 2012 at 3:46 PM, Amy Anderson <amyla333 at gmail.com> wrote:
> Hi macport users,
>
> I am trying to run this script in python and the script is now working with
> the test data (eigen problem solved) but when I input my own data to be
> called by script I got the following errors.
>
> [moriaht-5:~/Desktop/pyClusterROI] moriah% python pyClusterROI_test.py
> tcorr connectivity subject2002.nii
>
> Traceback (most recent call last):
>   File "pyClusterROI_test.py", line 89, in <module>
>     make_local_connectivity_tcorr( infiles[i], maskname, outname, 0.5 )
>   File
> "/Users/moriah/Desktop/pyClusterROI/make_local_connectivity_tcorr.py", line
> 114, in make_local_connectivity_tcorr
>     msk=csc_matrix((range(1,m+1),(iv,zeros(m))),shape=(prod(sz[1:]),1))
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/sparse/compressed.py",
> line 44, in __init__
>     other = self.__class__( coo_matrix(arg1, shape=shape) )
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/sparse/coo.py",
> line 188, in __init__
>     self._check()
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/sparse/coo.py",
> line 220, in _check
>     raise ValueError('row index exceedes matrix dimensions')
> ValueError: row index exceedes matrix dimensions
>
>
> I was wondering if anyone might know what this error might mean or how to
> fix it?

Off the top of my head, no ideas besides the obvious "the index is
larger than the number of rows in the matrix" from the error message.
Since this error is coming from make_local_connectivity_tcorr, you'll
have to the authors of pyClusterROI.py to look into it, or better yet,
use a newer script (if available) from http://nipy.sourceforge.net.


More information about the macports-users mailing list