I would like to duplicate an array inside the array to account for a duplicated separate array. The data I have is for thousands of numbers but for simplification, this is what I'm looking for:
a = [1,2,3,4,5]
b = [2,6,5,7,3]
new_a = [1,2,3,4,5,1,2,3,4,5]
new_b = [2,6,5,7,3,2,6,5,7,3]
#array b
magnitude = data[:,1]
# phaseresult_i is array a
for t in range(len(time)):
floor = math.floor((time[t]-time[0])/(bestperiod))
phase_i = ((time[t]-time[0])/(bestperiod))-floor
phaseresult_i.append(phase_i)
newphaseresult_i = phaseresult_i +phaseresult_i
newmagnitude = magnitude + magnitude
Above is what I have exactly in my code, and the length of the first array doubles but the length of the second array does not.
to account for a duplicated separate arrayWhat does that mean?