[Numpy-discussion] Enhancing dot()

Charles R Harris charlesr.harris at gmail.com
Fri Jul 7 10:48:15 CDT 2006


On 7/7/06, Bill Baxter <wbaxter at gmail.com> wrote:
>
> On 7/7/06, Tim Hochberg <tim.hochberg at cox.net> wrote:
>
> > > The funny thing is that having a dot(a,b,c,...) would lead to the
> > > exact same kind of hidden performance problems you're arguing against.
> > Not exactly arguing -- this isn't why I don't like H and friends -- just
> >
> > noting that this is one of the traps that people are likely to fall into
> > when transferring equations to code.
>
>
<snip>

A = D
> A *= -2
> A += C
> A += B
>

I would like to write something like:

A = D.copy().times(-2).plus(C).plus(B)

i.e. copy produces a "register", the rest is reverse Polish, and  =
"stores" the result.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20060707/230a6947/attachment-0001.html 


More information about the Numpy-discussion mailing list