forrestbao / pyeeg

Python + EEG/MEG = PyEEG
GNU General Public License v3.0
241 stars 85 forks source link

Add compulsory type conversion to bin_power #25

Closed powerfulbean closed 5 years ago

powerfulbean commented 6 years ago

Hi professor Bao! The pyeeg reported "TypeError: slice indices must be integers or None or have an index method" when I was using the bin_power() function with py3.6. I also tried it in py2.7 but the same error was reported. Then I found that with compulsory type conversion added to the parameters :numpy.floor(Freq / Fs len(X)) and numpy.floor(Next_Freq / Fs len(X)), it finally works. So, I think this change many be safier and less confused to the other users. Thank you for your work and your contribution to this program!!! 过年好!

forrestbao commented 5 years ago

Fixed in PR #21 .