It is an algorithm which plays a very important role in the computation of the Discrete Fourier Transform of a sequence. It converts a space or time signal to signal of the frequency domain.

The DFT signal is generated by the distribution of value sequences to different frequency component. Working directly to convert on Fourier transform is computationally too expensive. So, Fast Fourier transform is used as it rapidly computes by factorizing the DFT matrix as the product of sparse factors. As a result, it reduces the DFT computation complexity from O(n^{2}) to O(N log N). And this is a huge difference when working on a large dataset. Also, FFT algorithms are very accurate as compared to the DFT definition directly, in the presence of round-off error.

This transformation is a translation from the configuration space to frequency space and this is very important in terms of exploring both transformations of certain problems for more efficient computation and in exploring the power spectrum of a signal. This translation can be from x_{n} to X_{k}. It is converting spatial or temporal data into the frequency domain data.

**sympy.discrete.transforms.fft( ) :**

It can perform Discrete Fourier Transform (DFT) in the complex domain.

Automatically the sequence is padded with zero to the right because the **radix-2 FFT** requires the sample point number as a power of 2. For short sequences use this method with default arguments only as with the size of the sequence, the complexity of expressions increases.

Parameters :->seq :[iterable] sequence on which DFT is to be applied. ->dps :[Integer] number of decimal digits for precision.Returns :Fast Fourier Transform

**Example 1 : **

`# import sympy ` `from` `sympy ` `import` `fft ` ` ` `# sequence ` `seq ` `=` `[` `15` `, ` `21` `, ` `13` `, ` `44` `] ` ` ` `# fft ` `transform ` `=` `fft(seq) ` `print` `(transform) ` |

*chevron_right*

*filter_none*

**Output : **

FFT : [93, 2 - 23*I, -37, 2 + 23*I]

Example 2 :

`# import sympy ` `from` `sympy ` `import` `fft ` ` ` `# sequence ` `seq ` `=` `[` `15` `, ` `21` `, ` `13` `, ` `44` `] ` ` ` `decimal_point ` `=` `4` ` ` `# fft ` `transform ` `=` `fft(seq, decimal_point ) ` `print` `(` `"FFT : "` `, transform) ` |

*chevron_right*

*filter_none*

**Output : **

FFT : [93, 2.0 - 23.0*I, -37, 2.0 + 23.0*I]

## Recommended Posts:

- Python | Inverse Fast Fourier Transformation
- Python | Number Theoretic Transformation
- Python | Inverse Number Theoretic Transformation
- Python | Fast Walsh Hadamard Transform
- Program to calculate area of a parallelogram
- Find the root of given non decreasing function between A and B
- Count of Right-Angled Triangle formed from given N points whose base or perpendicular are parallel to X or Y axis
- Count of nested polygons that can be drawn by joining vertices internally
- Count of distinct numbers formed by shuffling the digits of a large number N
- Count of carry operations on adding two Binary numbers
- Find the area of rhombus from given Angle and Side length
- C Program to check whether a number is a Perfect Cube or not
- Check if a number can be expressed as sum of two Perfect powers
- Find two distinct numbers such that their LCM lies in given range

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.