[SciPy-user] Trouble with linsolve

Nils Wagner nwagner at iam.uni-stuttgart.de
Tue Nov 28 10:53:04 CST 2006


Bill Baxter wrote:
> Just a guess, but I think the problem is just that usually when people
> solve sparse equations the matrix is sparse, but the RHS vector is
> dense.   I don't know if UMFPACK or SuperLU can actually handle a
> sparse RHS vector, but if they can, then it sounds like a SciPy bug.
>
> I guess it should work if you convert your 'f' to a dense array before
> making the calls to the solver.
>
> Regards,
> --bb
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>   
With UMFPACK 4.4 and a dense RHS I get

    x = spsolve(K_dyn, f)
  File "/usr/lib64/python2.4/site-packages/scipy/linsolve/linsolve.py",
line 65, in spsolve
    return umf.linsolve( umfpack.UMFPACK_A, mat, b, autoTranspose = True )
  File
"/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py",
line 566, in linsolve
    sol = self.solve( sys, mtx, rhs, autoTranspose )
  File
"/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/umfpack.py",
line 508, in solve
    self._numeric, self.control, self.info )
  File
"/usr/lib64/python2.4/site-packages/scipy/linsolve/umfpack/_umfpack.py",
line 214, in umfpack_di_solve
    return __umfpack.umfpack_di_solve(*args)
ValueError: object too deep for desired array
>>> K_dyn
<71987x71987 sparse matrix of type '<type 'numpy.float64'>'
        with 3083884 stored elements (space for 3083884)
        in Compressed Sparse Column format>

Any idea ?

Nils



More information about the SciPy-user mailing list