From: Stefan v. d. W. <st...@su...> - 2006-06-22 08:49:33
|
Hi Tim On Wed, Jun 21, 2006 at 12:02:27PM -0700, Tim Hochberg wrote: >=20 > Numexpr can now handle broadcasting. As an example, check out this=20 > implementation of the distance-in-a-bunch-of-dimenstions function that'= s=20 > been going around. This is 80% faster than the most recent one posted o= n=20 > my box and considerably easier to read. This looks really cool. However, it does seem to break scalar operation: a =3D 3. b =3D 4. expr =3D numexpr("2*a+3*b",[('a',float),('b'.float)]) expr.run(a,b) Out[41]: array(-7.1680117685147315e-39) I havn't used numexpr before, so I could be doing something silly (although I did verify that the above works on r1986). Cheers St=E9fan |