[SciPy-dev] scipy.splinalg or bust

Nathan Bell wnbell@gmail....
Thu Jan 31 11:29:42 CST 2008

On Jan 31, 2008 9:21 AM, Robert Cimrman <cimrman3@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@gmail.com

More information about the Scipy-dev mailing list