With the help of scipy.ifft() method, we can compute the inverse fast fourier transformation by passing simple 1-D numpy array and it will return the transformed array by using this method.

Inverse Fast Fourier Transformation
Syntax : scipy.ifft(y)
Return : Return the transformed array.
Example #1 :
In this example we can see that by using scipy.ifft() method, we are able to get the inverse fast fourier transformation and return the transformed array.
Python3
# import scipy and numpy import scipy import numpy as np x = np.array(np.arange( 10 )) gfg_transformed = scipy.fft(x) # Using scipy.ifft() method gfg_inversed = scipy.ifft(gfg_transformed) print (gfg_inversed) |
Output :
[0.-1.77635684e-16j 1.+0.00000000e+00j 2.+1.43710287e-16j
3.+0.00000000e+00j 4.-5.48924451e-17j 5.+0.00000000e+00j
6.-5.48924451e-17j 7.+0.00000000e+00j 8.+1.43710287e-16j
9.+0.00000000e+00j]
Example #2 :
Python3
# import scipy and numpy import scipy import numpy as np x = np.array(np.arange( 5 )) gfg_transformed = scipy.fft(x) # Using scipy.ifft() method gfg_inversed = scipy.ifft(gfg_transformed) print (gfg_inversed) |
Output :
[0.+0.j 1.+0.j 2.+0.j 3.+0.j 4.+0.j]
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.