ermongroup / Wifi_Activity_Recognition

Code for IEEE Communication Magazine (A Survey on Behaviour Recognition Using WiFi Channle State Information)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

index Error when the program is writing csv files

ludlows opened this issue · comments

commented

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

commented

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.