I'm trying to create an array of of the number of elements I have in another array, but appending to the array in a loop gives me too many numbers.
xaxis = np.zeros(len(newdates))
for i in newdates:
xaxis = np.append(xaxis, i)
Instead of [1,2,3,4,.....] like I want, it's giving me an array of [1,1,2,1,2,3,1,2,3,4,.....].
This seems like an easy question, but it's hanging me up for some reason.