ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> scipy-user
scipy-user
Re: [SciPy-user] Trouble with linsolve
by Nils Wagner other posts by this author
Nov 28 2006 9:14AM messages near this date
Re: [SciPy-user] Trouble with linsolve | Re: [SciPy-user] Trouble with linsolve
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@[...].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

_______________________________________________
SciPy-user mailing list
SciPy-user@[...].org
http://projects.scipy.org/mailman/listinfo/scipy-user
Thread:
Nils Wagner
Nils Wagner
Bill Baxter
Nils Wagner
Nils Wagner

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved