Nfreq = Nbins / 2
Nfreq = int(Nbins / 2)
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-6-d70eb03ef0a7> in <module>() 47 f = df * np.arange(Nfreq) 48 ---> 49 PSD_window = abs(np.fft.fft(window)[:Nfreq]) ** 2 50 PSD_y = abs(np.fft.fft(y)[:Nfreq]) ** 2 51 PSD_obs = abs(np.fft.fft(y * window)[:Nfreq]) ** 2 TypeError: slice indices must be integers or None or have an __index__ method