I want to create an array based on array generated from a for loop, however, I only get last array, how could I add arrays together
import numpy as np
x=np.array([1,1,3,3,5,5,5,5])
for xx in range(0,len(x),4):
yy=x[xx:xx+4]
zz=np.tile(yy,2)
print(zz) # EXPECTED z=[1 1 3 3 1 1 3 3 5 5 5 5 5 5 5 5]
yy&zzevery iteration, no aggregation, so why should anything else happen?