[Numpy-discussion] inplace matrix multiplication

2009-01-09 Thread Frédéric Bastien
Hi, I would like to know how I can make a call to the blas function gemm in numpy. I need a multiply and accumulate for matrix and I don't want to allocate a new matrix each time I do it. thanks for your time Frederic Bastien ___ Numpy-discussion maili

Re: [Numpy-discussion] inplace matrix multiplication

2009-04-24 Thread David Warde-Farley
On 9-Jan-09, at 4:31 PM, Robert Kern wrote: > You can't in numpy. With scipy.linalg.fblas.dgemm() and the right > arguments, you can. Make sure your output array is Fortran-ordered, however, otherwise copies will be made. David ___ Numpy-discussion m

Re: [Numpy-discussion] inplace matrix multiplication

2009-04-27 Thread Frédéric Bastien
You are right, some here told me about this. I should have posted it here for reference. thanks Fred On Fri, Apr 24, 2009 at 1:45 PM, David Warde-Farley wrote: > On 9-Jan-09, at 4:31 PM, Robert Kern wrote: > > > You can't in numpy. With scipy.linalg.fblas.dgemm() and the right > > arguments, yo

Re: [Numpy-discussion] inplace matrix multiplication

2009-04-28 Thread Dan Goodman
Can anyone explain the results below? It seems that for small matrices dot(x,y) is outperforming dgemm(1,x,y,0,y,overwrite_c=1), but for larger matrices the latter is winning. In principle it seems like I ought to be able to always do better with inplace rather than making copies? From looking

Re: [Numpy-discussion] inplace matrix multiplication

2009-04-28 Thread David Warde-Farley
On 28-Apr-09, at 10:56 AM, Dan Goodman wrote: > Can anyone explain the results below? It seems that for small matrices > dot(x,y) is outperforming dgemm(1,x,y,0,y,overwrite_c=1), but for > larger > matrices the latter is winning. In principle it seems like I ought > to be > able to always do b

Re: [Numpy-discussion] inplace matrix multiplication

2009-01-09 Thread Robert Kern
On Fri, Jan 9, 2009 at 08:25, Frédéric Bastien wrote: > Hi, > > I would like to know how I can make a call to the blas function gemm in > numpy. I need a multiply and accumulate for matrix and I don't want to > allocate a new matrix each time I do it. You can't in numpy. With scipy.linalg.fblas.d

Re: [Numpy-discussion] inplace matrix multiplication

2009-01-13 Thread Frédéric Bastien
Thanks, and sorry for the delayed reply. Fred On Fri, Jan 9, 2009 at 4:31 PM, Robert Kern wrote: > On Fri, Jan 9, 2009 at 08:25, Frédéric Bastien wrote: > > Hi, > > > > I would like to know how I can make a call to the blas function gemm in > > numpy. I need a multiply and accumulate for matri