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

Plotting the spectrum in STFT/Stochastic/SPS/HPS model does not work. #55

Closed
fllprbt opened this issue Apr 24, 2017 · 3 comments
Closed

Comments

@fllprbt
Copy link

fllprbt commented Apr 24, 2017

#Same problem everywhere, TypeError: 'float' object cannot be interpreted as an index

STFT is solved :: #52

@GarrettArm
Copy link

rolling back to numpy version 1.11.0 solves this issue. pip install numpy==1.11.0

i do not understand the sms-tools code well enough to revise it, but rolling back numpy is a solution.

@xserra xserra closed this as completed May 8, 2017
@aamirmalik
Copy link

I rolled back numpy to 1.11.0 as suggested. It seems that there are some incompatibility with numpy 1.12.1. After rolling back i get deprication warnings : "stft_function.py:70: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future"

Aamirs-MBP:models_interface amalik$ pip2.7 install numpy==1.11.0
Collecting numpy==1.11.0
Downloading numpy-1.11.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.9MB)
100% |████████████████████████████████| 3.9MB 293kB/s
Installing collected packages: numpy
Found existing installation: numpy 1.12.1
Uninstalling numpy-1.12.1:
Successfully uninstalled numpy-1.12.1
Successfully installed numpy-1.11.0

Aamirs-MBP:models_interface amalik$ python models_GUI.py
/Users/amalik/Google Drive/Courses/AudioSignalProcessingForMusicApplications/sms-tools/software/models_interface/stft_function.py:59: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
plt.pcolormesh(frmTime, binFreq, np.transpose(mX[:,:Nmaxplotfreq/fs+1]))
/Users/amalik/Google Drive/Courses/AudioSignalProcessingForMusicApplications/sms-tools/software/models_interface/stft_function.py:70: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
plt.pcolormesh(frmTime, binFreq, np.transpose(np.diff(pX[:,:N
maxplotfreq/fs+1],axis=1)))

@DavidAntliff
Copy link

@aamirmalik it's a known issue as it uses floats for array indices. It has been reported on the course forum, has a simple fix (wrap with int()), and doesn't cause any numerical problems.

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

5 participants