[Numpy-discussion] a**2 not executed as a*a if a.dtype = int32

Sebastian Haase haase at msg.ucsf.edu
Sun Aug 27 14:06:22 CDT 2006

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')
 >>> U.timeIt('a*a')
 >>> a.dtype
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 , ... ??

- Sebastian Haase

More information about the Numpy-discussion mailing list