Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input 18 of the code/voss.ipynb, the Barlett Method function, fails with a type error #65

Closed
tionebrr opened this issue Nov 26, 2019 · 1 comment

Comments

@tionebrr
Copy link

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
@tionebrr tionebrr changed the title Input 19 of the code/voss.ipynb, Barlett Method function, fails with a type error Input 18 of the code/voss.ipynb, the Barlett Method function, fails with a type error Nov 26, 2019
@AllenDowney
Copy link
Owner

It looks like the current version is working, but let me know if a problem persists. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants