[Numpy-discussion] a**2 not executed as a*a if a.dtype = int32
Sebastian Haase
haase at msg.ucsf.edu
Sun Aug 27 15:06:22 EDT 2006
Hi,
I submitted this as ticket #230 3weeks ago.
I apparently assigned it to "somebody" - was that a mistake?
Just for refernce, here is the short text again:
>>> a=N.random.poisson(N.arange(1e6)+1)
>>> U.timeIt('a**2')
0.59
>>> U.timeIt('a*a')
0.01
>>> a.dtype
int32
float64, float32 work OK - giving equal times for both cases. (I tested
this on Linux 32 bit, Debian sarge)
Am I right that numarray never did this kind of "smart speed up" !?
What are the cases that are speed up like this ? **2, **.5 , ... ??
Thanks,
- Sebastian Haase
More information about the NumPy-Discussion
mailing list