ermongroup/Wifi_Activity_Recognition

index Error when the program is writing csv files

Closed this issue · 2 comments

Hi,

I run your code smoothly until facing the following error:

`
in dataimport(path1, path2)
77 y[k/slide_size,:] = np.array([0,0,0,0,0,0,0,1])
78 else:
---> 79 y[k/slide_size,:] = np.array([2,0,0,0,0,0,0,0])
80 k += slide_size
81

IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices
`
should I use integer division here?

Did you use integer here to get this to run? Thanks

Did you use integer here to get this to run? Thanks

Yes. I am using integer as the index.
this error may caused by python version.
the author seems using python 2. and I am using python 3.