ermongroup / Wifi_Activity_Recognition

Code for IEEE Communication Magazine (A Survey on Behaviour Recognition Using WiFi Channle State Information)
GNU General Public License v3.0
251 stars 78 forks source link

index Error when the program is writing csv files #18

Closed ludlows closed 5 years ago

ludlows commented 5 years ago

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?
AV-Coding commented 4 years ago

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

ludlows commented 4 years ago

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.