I have spent numerous hours on this and still can't see what is wrong with my while loop.
i = 0
while(i < points):
trainingset[i][0] = firstx[i]
trainingset[i][1] = firsty[i]
trainingset[i][2] = 1
i+= 1
print(trainingset)
I want the while loop to loop over every array inside trainingsetsuch that trainingset[0] = [firstx[0], firsty[0], 1] and trainingset[points-1] = [firstx[points-1], firsty[points-1], 1].
However, the code seems to loop over ever subarray of trainingset for each iteration of i, such that at the end trainingset[0] = [firstx[points-1], firsty[points-1], 1]and so does every single subarray of trainingset.
What is wrong with this while loop?
P.S firstx and firsty are 1d arrrays like [1,2,3] and points is a number.