In this Github Repository you can see how a Fast Fourier Transformation is implement via using the numpy library for faster array and matrix calculations. The code contains a couple of examples for transforming arrays and matrices. The implementations of the FFTs are based on the explanations of the Book "Introduction to Numerical Analysis"[1}.
- FFT for arrays
- iFFT for arrays
- FFT2D for matrices
- iFFT2D for matrices
git clone https://github.com/JanMarcelKezmann/Fast-Fourier-Transformation-with-Python-and-Numpy.git
pip install -r requirements.txt
Make sure you have the following installed:
- keras
- numpy
- matplotlib
Just open the .ipynb code in a Notebook of your choice and run it.
The code always compares the received transformation with the correct one given by Numpy. For all implemented FFTs the code works just as well as it should. Anyway it is clearly visible in the last example that the code is lacking speed. This is due to the slow speed of Python as well as the used algortihm.
- [1] Introduction to Numerical Analysis, J. Stoer & R. Bullisch, Springer, 2nd edition