Skip to content

Instantly share code, notes, and snippets.

View mazunki's full-sized avatar
📚
Doing university homework

Rolf Vidar Mazunki Hoksaas mazunki

📚
Doing university homework
View GitHub Profile
@Eight1911
Eight1911 / radix-2-fft.py
Last active March 28, 2022 20:54
Naive implementation of non-recursive radix-2 fast Fourier transform in Python.
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