Re: [Numpy-discussion] Matrix Class [was numpy release]

2008-04-29 Thread Bill Spotz
On Apr 29, 2008, at 2:50 AM, Robert Cimrman wrote: > FYI: > In scipy, the iterative solvers (cg and like) should work with > LinearOperator (a class with matvec, rmatvec, and eventually matmat > methods) passed instead of the A matrix argument. There is a function > aslinearoperator() is scipy.spa

Re: [Numpy-discussion] Matrix Class [was numpy release]

2008-04-29 Thread Robert Cimrman
Bill Spotz wrote: > On Apr 28, 2008, at 10:47 PM, Bill Spotz wrote: > >> As for this example, my version should work with a properly >> implemented sparse_matrix A, but the array approach precludes that. >> That is to say, I could convert A to a matrix if it is provided as an >> array, but you cou

Re: [Numpy-discussion] Matrix Class [was numpy release]

2008-04-28 Thread Alan G Isaac
On Mon, 28 Apr 2008, Bill Spotz apparently wrote: > If matrix multiplication in my example is replaced with > np.dot() in yours, then when IS anything gained by using > matrices? When matrix algebra is clearer than array algebra. But that is not the case for this algorithm. (Just the opposite,

Re: [Numpy-discussion] Matrix Class [was numpy release]

2008-04-28 Thread Bill Spotz
On Apr 28, 2008, at 10:47 PM, Bill Spotz wrote: > As for this example, my version should work with a properly > implemented sparse_matrix A, but the array approach precludes that. > That is to say, I could convert A to a matrix if it is provided as an > array, but you could not convert a sparse_ma

Re: [Numpy-discussion] Matrix Class [was numpy release]

2008-04-28 Thread Bill Spotz
On Apr 28, 2008, at 10:15 PM, Alan G Isaac wrote: > On Mon, 28 Apr 2008, Bill Spotz apparently wrote: >> http://www.scipy.org/ConjugateGradientExample ... provides >> one small area where the vector classes would be useful. > > Maybe not. > I posted an alternate version of your algorithm, > just b

Re: [Numpy-discussion] Matrix Class [was numpy release]

2008-04-28 Thread Alan G Isaac
On Mon, 28 Apr 2008, Bill Spotz apparently wrote: > http://www.scipy.org/ConjugateGradientExample ... provides > one small area where the vector classes would be useful. Maybe not. I posted an alternate version of your algorithm, just below yours, sticking very close to your example. Cheers, Al

Re: [Numpy-discussion] Matrix Class [was numpy release]

2008-04-28 Thread Bill Spotz
On Apr 24, 2008, at 8:52 PM, Bill Spotz wrote: On Apr 24, 2008, at 5:45 PM, Timothy Hochberg wrote: Bill Spotz wrote: > I have generally thought about this in the context of, say, a > Krylov-space iterative method, and what that type of interface would > lead to the most readable code. Can

Re: [Numpy-discussion] Matrix Class [was numpy release]

2008-04-24 Thread Charles R Harris
On Thu, Apr 24, 2008 at 5:45 PM, Timothy Hochberg <[EMAIL PROTECTED]> wrote: > > > Chris.Barker wrote: > >> Alan G Isaac wrote: >> > the cost of complexity should be justified by a gain in functionality. >> >> I don't think functionality is the right word here. the Matrix class(es) >> is all about

Re: [Numpy-discussion] Matrix Class [was numpy release]

2008-04-24 Thread Bill Spotz
On Apr 24, 2008, at 5:45 PM, Timothy Hochberg wrote: Bill Spotz wrote: > I have generally thought about this in the context of, say, a > Krylov-space iterative method, and what that type of interface would > lead to the most readable code. Can you whip up a small example, starting with the curr

Re: [Numpy-discussion] Matrix Class [was numpy release]

2008-04-24 Thread Timothy Hochberg
Chris.Barker wrote: > Alan G Isaac wrote: > > the cost of complexity should be justified by a gain in functionality. > > I don't think functionality is the right word here. the Matrix class(es) > is all about clean, convenient API, i.e. style, not functionality -- we > have all the functionality a