Skip to content
Related Articles

Related Articles

Improve Article

Python – scipy.fft.idst() method

  • Last Updated : 01 Oct, 2020

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 example, we can see that by using scipy.fft.idst() method, we are able to get the inverse of discrete sine transform by selecting different types of sequences by default it’s 2.

Python3






# import scipy
from scipy import fft
  
# Using scipy.fft.idst() method
gfg = fft.idst([1, 2, 3, 4])
  
print(gfg)

Output :

[ 1.6421339  -0.2024893   0.09040392 -0.06497288]

Example #2 :

Python3




# import scipy
from scipy import fft
  
# Using scipy.fft.idst() method
gfg = fft.idst([-6, 5, -4, 3, -2, 1], 3)
  
print(gfg)

Output :

[-0.02311678  0.00 -0.11785113  0.000 -1.20162809 -3.5]

 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. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course

My Personal Notes arrow_drop_up
Recommended Articles
Page :