[SciPy-user] Trouble with linsolve

Nils Wagner nwagner at iam.uni-stuttgart.de
Tue Nov 28 10:11:15 EST 2006


Hi all,

I would like to solve

K_dyn x = f,

where K_dyn is a sparse matrix.  UMFPACK is not installed and I am using
the latest svn version.

>>> K_dyn
<71987x71987 sparse matrix of type '<type 'numpy.float64'>'
        with 3083884 stored elements (space for 3083884)
        in Compressed Sparse Column format>
>>> f
<71987x1 sparse matrix of type '<type 'numpy.float64'>'
        with 52 stored elements (space for 52)
        in Compressed Sparse Column format>
>>> x = spsolve(K_dyn, f)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File
"/usr/local/lib64/python2.4/site-packages/scipy/linsolve/linsolve.py",
line 75, in spsolve
    b = asarray(b, dtype=data.dtype)
  File "/usr/local/lib64/python2.4/site-packages/numpy/core/numeric.py",
line 132, in asarray
    return array(a, dtype, copy=False, order=order)
ValueError: setting an array element with a sequence.

Is this a bug ?

Nils




More information about the SciPy-User mailing list