bci-challenge-ner-2015 icon indicating copy to clipboard operation
bci-challenge-ner-2015 copied to clipboard

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

Open SeekPoint opened this issue 6 years ago • 2 comments

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

SeekPoint avatar Jul 07 '18 02:07 SeekPoint

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

NayhaShahid avatar Aug 27 '18 07:08 NayhaShahid

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).

okbalefthanded avatar Dec 24 '18 18:12 okbalefthanded