Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/arange.py
diff options
context:
space:
mode:
authorBenjamin Schwartz <bens@alum.mit.edu>2007-11-04 03:37:49 (GMT)
committer Benjamin Schwartz <bens@alum.mit.edu>2007-11-04 03:37:49 (GMT)
commitafe8c40fe6de4295c27bacab2248b153eab767b0 (patch)
treed0d5c39e7df5bc5ef7fc9fff5394f309553af3fb /arange.py
parente4727d19b35fb89adde68ac9572572e64741a864 (diff)
Change to real fft for speed
Diffstat (limited to 'arange.py')
-rwxr-xr-xarange.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/arange.py b/arange.py
index 7ab1509..a2f6135 100755
--- a/arange.py
+++ b/arange.py
@@ -277,13 +277,13 @@ def cross_cov(a, b, a_id=None):
if cache_dict.has_key(('fft', a_id, n2)):
fa = cache_dict[('fft', a_id, n2)]
else:
- fa = num.fft.fft(a,n2)
+ fa = num.fft.rfft(a,n2)
cache_dict[('fft', a_id, n2)] = fa
else:
- fa = num.fft.fft(a,n2)
- fb = num.fft.fft(b,n2)
+ fa = num.fft.rfft(a,n2)
+ fb = num.fft.rfft(b,n2)
fprod = num.conjugate(fa)*fb
- xc = num.fft.ifft(fprod)
+ xc = num.fft.irfft(fprod)
return xc[:n].real
def get_room_echo(t):