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

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

Open
SeekPoint opened this issue Jul 7, 2018 · 2 comments

Comments

@SeekPoint
Copy link

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
Copy link

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

@okbalefthanded
Copy link

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

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

3 participants