alexandrebarachant / bci-challenge-ner-2015

Code and documentation for the winning solution to the BCI Challenge @ NER 2015 : https://www.kaggle.com/c/inria-bci-challenge
GNU General Public License v3.0
190 stars 75 forks source link

TypeError: slice indices must be integers or None or have an __index__ method #4

Open SeekPoint opened 6 years ago

SeekPoint commented 6 years ago

mldl@mldlUB1604:~/ub16_prj/bci-challenge-ner-2015/preproc$ python preproc.py ../data/train/Data_S02_Sess01.csv Traceback (most recent call last): File "preproc.py", line 60, in X.append(sigF[idx:idx+epoc_window,:]) TypeError: slice indices must be integers or None or have an index method

NayhaShahid commented 6 years ago

I'm having the same error. Does anyone know the solution?

okbalefthanded commented 5 years ago

epoc_window is a real value, whereas the indices must be integer values, so a simple solution is to convert the epoc_window type by calling int function: int(epoc_window).