scipy.fftshift() in Python Last Updated : 29 Aug, 2020 Comments Improve Suggest changes Like Article Like Report 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 using scipy.fftshift() method, we are able to shift the lower half and upper half of the vector by using fast fourier transformation and return the shifted vector. Python3 # import scipy and numpy import scipy import numpy as np x = np.arange(6) # Using scipy.fftfreq() method gfg = scipy.fft.fftshift(x) print(gfg) Output : [3 4 5 0 1 2] Example #2 : Python3 # import scipy and numpy import scipy import numpy as np x = np.arange(11) # Using scipy.fftfreq() method gfg = scipy.fft.fftshift(x) print(gfg) Output : [ 6 7 8 9 10 0 1 2 3 4 5] Comment More infoAdvertise with us Next Article scipy.fftshift() in Python J jitender_1998 Follow Improve Article Tags : Python Python-scipy Python scipy-stats-functions Practice Tags : python Similar Reads scipy.fft() in Python 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 w 1 min read 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 Python - scipy.fft.idct() method With the help of scipy.fft.idct() method, we can compute the inverse discrete cosine transform by selecting different types of sequences and return the transformed array by using this method. Syntax : scipy.fft.idct(x, type=2) Return value: It will return the inverse transformed array. Example #1: I 1 min read Python - scipy.fft.idst() method With the help of scipy.fft.idst() method, we can compute the inverse of discrete sine transform by selecting different types of sequences and return the transformed array by using this method. Syntax: scipy.fft.idst(x, type=2) Return value: It will return the transformed array. Example #1: In this e 1 min read Like