[SciPy-dev] scipy.sparse + umfpack + system_info

Ed Schofield schofield at ftw.at
Tue Mar 28 12:24:34 EST 2006


Robert Cimrman wrote:
> Ed Schofield wrote:
>> Robert Cimrman wrote:
>>
>>> Hi all,
>>> I have added a basic umfpack detection support to
>>> numpy.distutils.system_info() - see example site.cfg below (and
>>> replace <UMFPACKv4.4_root>...).
>>> The Umfpack wrapper still resides in the sandbox, but its setup.py now
>>> uses the detection stuff.
>>>
>>> Now I would like to move the wrapper somewhere under scipy.sparse and
>>> I hit a problem: umpfack.py depends on scipy.sparse, since it uses the
>>> CSR/CSC matrix formats, but also scipy.sparse uses umfpack.py for
>>> solving linear equations.if present. How to get out of this circular
>>> dependency problem? Do you have any suggestions on how to organize the
>>> files?
>>
>> Hi Robert,
>>
>> Great work! :)
>>
>> I suggest we move the solvers out of sparse.py, leaving only the data
>> types.  We could put them instead into a separate module that depends on
>> both sparse.py and umfpack.py.  We can still have them accessible under
>> the scipy.sparse namespace by adding a line like
>>     from umfsolvers import *
>> to sparse/__init__.py.
>
> Yes, ideally I would like to see having a direct solver module and an
> iterative solver module, each working with both the dense and the
> sparse matrices. But for the moment we could just move solve() and
> lu_factor() somewhere else (linsolve package?). I am bad at coming
> with names :-)

I'm not sure about the ideal package structure.  A new linsolve package
would make sense -- or we could leave the solvers as a separate module
in the sparse package until we have wrappers for dense solvers too.  Or
perhaps, eventually, we'd want to consolidate the linear solvers and
non-linear solvers (e.g. minpack, currently in the optimize package)
under a single "solve" package?

-- Ed




More information about the SciPy-Dev mailing list