TypeError Traceback (most recent call last)
<ipython-input-19-4acaa3d0f7dd> in <module>
----> 1 spectrum = bartlett_method(wave, seg_length=seg_length, win_flag=False)
2 spectrum.hs[0] = 0
3 len(spectrum)
<ipython-input-18-0c3fecb9be50> in bartlett_method(wave, seg_length, win_flag)
14 # compute the root mean power (which is like an amplitude)
15 hs = np.sqrt(sum(psds) / len(psds))
---> 16 fs = spectrums[0].fs
17
18 # make a Spectrum with the mean amplitudes
TypeError: 'dict_values' object is not subscriptable