You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fft funtion from the analyticClass of PSL has a fundamental issue that leads to type error
deffft(self, ya, si):
ns=len(ya)
ifns%2==1: # odd values of np give exceptionsns-=1# make it evenya=ya[:-1]
v=np.array(ya)
tr=abs(np.fft.fft(v)) /nsfrq=np.fft.fftfreq(ns, si)
x=frq.reshape(2, ns/2)
y=tr.reshape(2, ns/2)
returnx[0], y[0]
The 3rd last and 2nd last line of the code should be