[SciPy-dev] scipy.splinalg or bust

Nathan Bell wnbell at gmail.com
Thu Jan 31 12:29:42 EST 2008


On Jan 31, 2008 9:21 AM, Robert Cimrman <cimrman3 at ntc.zcu.cz> wrote:
> Great! what about allowing the LinearOperator.__init__() to take care of
> the cases that aslinearoperator() takes care of? Or
> LinearOperator.fromany()/fromAny() static/class method?

I considered that approach but decided against it.  I like keeping
LinearOperator dead simple since it's what end users will have to
understand if they want to hook up their matrix-like objects to scipy
solvers.  Currently aslinearoperator() is the part that "knows" about
scipy/numpy while LinearOperator is just an abstract interface.

Another practical issue is that LinearOperator needs to be initialized
with at least two arguments (shape and matvec) while
aslinearoperator() only accepts one.  The classmethod approach avoids
this, but I have a (possibly irrational) dislike for classmethods :)

Scipy users should understand asarray(), so I think aslinearoperator()
is a fairly natural extension.


-- 
Nathan Bell wnbell at gmail.com
http://graphics.cs.uiuc.edu/~wnbell/



More information about the SciPy-Dev mailing list