I have a list of size 1000, data_0. And, I wanted to refer to an element located at index 250. So, for this, I tried to run following line of code:
data_0[len_0/4]
Here, len is an integer with value "1000". Even with this simple statement, the python intepretor throws following error:
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
At other places, I got following error for a similar symptomn:
TypeError: slice indices must be integers or None or have an __index__ method