This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import threading | |
import functools | |
import time | |
import matplotlib.pyplot as plt | |
from functools import update_wrapper | |
from time import clock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
# iterative cooley tukey fft for dyadics | |
def fft(v): | |
n, h = len(v), len(v) >> 1 | |
old, new = v[:], [0] * n | |
sublen, stride = 1, n | |
while sublen < n: | |
stride >>= 1 |