At 10:01 AM 9/20/2015, you wrote:
>Is that not the same as
>Â Â np.abs(z)**2 ?
>
>It is, but since that involves taking sqrt, it is *much* slower. Even now,
>```
>In [32]: r = np.arange(10000)*(1+1j)
>
>In [33]: %timeit np.abs(r)**2
>1000 loops, best of 3: 213 µs per loop
>
>In [34]: %timeit r.real**2 + r.imag**2
>10000 loops, best of 3: 47.5 µs per loop
>
>-- Marten
Ahh yes, a full extra step, "back"
Assuming these are spectra, how does timeit do
with scipy.signal.periodogram (using appropriate n and scaling)?
- Ray