[Numpy-discussion] avoiding the matrix copy performance hit
wbaxter at gmail.com
Mon Feb 13 18:27:04 CST 2006
On 2/14/06, Tim Hochberg <tim.hochberg at cox.net> wrote:
> Bill Baxter wrote:
> > *Copying all the data of the input array seems wasteful when the array
> > is just going to go out of scope. Or is this not something to be
> > concerned about?
> You could try using copy=False:
Lovely. That does the trick. And the syntax isn't so bad after defining a
little helper like:
def matr(a): return mat(a,copy=False)
> >>> t2.timeit(100)
> I'd also like to point out that your computer appears to be much faster
> than mine.
Duly noted. :-)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion