[Numpy-discussion] Numexpr does broadcasting.
Stefan van der Walt
stefan at sun.ac.za
Sun Jun 18 21:14:44 EDT 2006
On Wed, Jun 21, 2006 at 12:02:27PM -0700, Tim Hochberg wrote:
> Numexpr can now handle broadcasting. As an example, check out this
> implementation of the distance-in-a-bunch-of-dimenstions function that's
> been going around. This is 80% faster than the most recent one posted on
> my box and considerably easier to read.
This looks really cool. However, it does seem to break scalar
a = 3.
b = 4.
expr = numexpr("2*a+3*b",[('a',float),('b'.float)])
I havn't used numexpr before, so I could be doing something silly
(although I did verify that the above works on r1986).
More information about the NumPy-Discussion