scipy.fft() in Python Last Updated : 29 Aug, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report With the help of scipy.fft() method, we can compute the fast fourier transformation by passing simple 1-D numpy array and it will return the transformed array by using this method. Fast Fourier Transformation Syntax : scipy.fft(x) Return : Return the transformed array. Example #1 : In this example we can see that by using scipy.fft() method, we are able to compute the fast fourier transformation by passing sequence of numbers and return the transformed array. Python3 # import scipy and numpy import scipy import numpy as np x = np.array(np.arange(10)) # Using scipy.fft() method gfg = scipy.fft(x) print(gfg) Output : [45. +0.j -5.+15.38841769j -5. +6.8819096j -5. +3.63271264j -5. +1.62459848j -5. +0.j -5. -1.62459848j -5. -3.63271264j -5. -6.8819096j -5.-15.38841769j] Example #2 : Python3 # import scipy and numpy import scipy import numpy as np x = np.array(np.arange(5)) # Using scipy.fft() method gfg = scipy.fft(x) print(gfg) Output : [10. +0.j -2.5+3.4409548j -2.5+0.81229924j -2.5-0.81229924j -2.5-3.4409548j ] Comment More infoAdvertise with us Next Article scipy.fft() in Python J jitender_1998 Follow Improve Article Tags : Python Python-scipy Python scipy-stats-functions Practice Tags : python Similar Reads scipy.ifft() in Python 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 : 1 min read scipy.fftfreq() in Python With the help of scipy.fftfreq() method, we can compute the fast fourier transformation frequency and return the transformed array by using this method. Syntax : scipy.fftfreq(n, freq) Return : Return the transformed array. Example #1 : In this example we can see that by using scipy.fftfreq() method 1 min read scipy.fftshift() in Python With the help of scipy.fftshift() method, we can shift the lower and upper half of vector by using fast fourier transformation and return the shifted vector by using this method. Syntax : scipy.fft.fftshift(x) Return : Return the transformed vector. Example #1 : In this example we can see that by us 1 min read Python - scipy.fft.idctn() method With the help of scipy.fft.idctn() method, we can compute the inverse of multidimensional discrete cosine transform by selecting different types of sequences and return the transformed array by using this method. Syntax : scipy.fft.idctn(x, type=2) Return value: It will return the transformed array. 1 min read scipy.rfft() in Python With the help of scipy.rfft() method, we can compute the fast fourier transformation for real sequence and return the transformed vector by using this method. Syntax : scipy.fft.rfft(x) Return : Return the transformed vector. Example #1 : In this example we can see that by using scipy.rfft() method, 1 min read Like