I have a coordinate saved as a numpy array x = np.array([1,2])
and I am trying to create an array that repeats [1,2] n times. For example, to repeat 4 times, I would want the array to look like this:
array([1,2],[1,2],[1,2],[1,2])
I have tried using the function:
np.repeat(x, 4, axis=0)
but the output is flattened array that looks like this:
array([1,1,1,1,2,2,2,2])
Does anyone know how to do this?