Charles R Harris wrote:

> On Wed, Jan 8, 2014 at 2:39 PM, Julian Taylor <jtaylor.deb...@googlemail.com
>> wrote:
> 
...
> 
> Another function that could be useful is a |a|**2 function, abs2 perhaps.
> 
> Chuck

I use mag_sqr all the time.  It should be much faster for complex, if computed
via:

x.real**2 + x.imag**2

avoiding the sqrt of abs.

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to