import json
from scipy import fft

data=[1000,800,3000,50000,23,56,795]
x=list(fft.dct(data))
print(json.dumps(x,indent=4))

out=list(fft.idct(x))
print(json.dumps(out,indent=4))

x2=[x[0], x[1], 0, 0, 0, x[-2], x[-1]]
out2=list(fft.idct(x2))
print(json.dumps(out2,indent=4))

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: