Hello everyone,
I'm trying to compile this code:
Now I have this:
Thank you.
I'm trying to compile this code:
for idx, i in enumerate(array): if idx > phaseshift: if abs(i - array[idx - phaseshift]) > 1000 or True: self.phasespace_x.append(array[idx - phaseshift]) self.phasespace_y.append(i + array[idx - phaseshift]) self.linx = [max(self.phasespace_x),min(self.phasespace_x)]where the problem was at first in array variable. It was not defined. To reduce the error in the "enumerate " line I defined array as empty list as: array=[]. Because when I defined array as integer I got an error that integer in enumerate cannot be interated .
Now I have this:
Error:ValueError: max() arg is an empty sequence
which is quite logic I think because of empty variable array. Could you please tell me how to fix this problem? Thank you.