79366191

Date: 2025-01-17 22:02:01
Score: 0.5
Natty:
Report link

I looks like you skip the first datapoint since you write x = data[1:len(data),0] and so forth. As @trincot mentioned, you also have to care about the y[i-1] case for i=0. Maybe the following will help you:

tst = []
x = data[:,0]
y = data[:,1]  
intt = data[:,2]
for i in range(1,len(data)):
   if intt[i]!=0:         
      tst.append((x[i]**2.0+ y[i]-y[i-1])**2.0)
   else:
      break

This includes all data points in x, y, and intt, but the first data point will still be skipped since the loop starts with i=1.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @trincot
  • Low reputation (0.5):
Posted by: Slavensky