We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
PlotExampleSpectrum(ntf, M=1, osr=osr, f0=f0)
Traceback (most recent call last):
File "", line 1, in PlotExampleSpectrum(ntf, M=1, osr=osr, f0=f0)
File ".....\lib\site-packages\deltasigma_PlotExampleSpectrum.py", line 103, in PlotExampleSpectrum plt.plot(freq, dbv(spec0[:N/2 + 1]), 'c', linewidth=1)
TypeError: slice indices must be integers or None or have an index method
Change line File ".....\lib\site-packages\deltasigma_PlotExampleSpectrum.py", line 103, in PlotExampleSpectrum plt.plot(freq, dbv(spec0[:N/2 + 1]), 'c', linewidth=1) to plt.plot(freq, dbv(spec0[:int(N/2.0) + 1]), 'c', linewidth=1)
plt.plot(freq, dbv(spec0[:N/2 + 1]), 'c', linewidth=1)
plt.plot(freq, dbv(spec0[:int(N/2.0) + 1]), 'c', linewidth=1)
or whatever is convinient to let N/2 return an integer number.
N/2
The text was updated successfully, but these errors were encountered:
same issue on line 106
File ".......\lib\site-packages\deltasigma_PlotExampleSpectrum.py", line 106, in PlotExampleSpectrum plt.plot(freq, dbp(spec_smoothed[:N/2 + 1]), 'b', linewidth=3)
Sorry, something went wrong.
... and on line 87, 88 f1_bin = np.round(f1N) f2_bin = np.round(f2N) have been modified to f1_bin = int(np.round(f1N)) f2_bin = int(np.round(f2N))
... and voila got a pretty nice spectrum.
And not to forget ... Thank you for all the effort you spent.
I fixed these issues in my folked repository. Thank you for your report.
No branches or pull requests
PlotExampleSpectrum(ntf, M=1, osr=osr, f0=f0)
Traceback (most recent call last):
File "", line 1, in
PlotExampleSpectrum(ntf, M=1, osr=osr, f0=f0)
File ".....\lib\site-packages\deltasigma_PlotExampleSpectrum.py", line 103, in PlotExampleSpectrum
plt.plot(freq, dbv(spec0[:N/2 + 1]), 'c', linewidth=1)
TypeError: slice indices must be integers or None or have an index method
... running Python 3.7.0
Change line File ".....\lib\site-packages\deltasigma_PlotExampleSpectrum.py", line 103, in PlotExampleSpectrum
plt.plot(freq, dbv(spec0[:N/2 + 1]), 'c', linewidth=1)
to
plt.plot(freq, dbv(spec0[:int(N/2.0) + 1]), 'c', linewidth=1)
or whatever is convinient to let
N/2
return an integer number.The text was updated successfully, but these errors were encountered: