What is the shortest code to repeat numpy array([x,y,z]) and make array([[x,y,z], [x,y,z], [x,y,z], ...]) which to make the code like shown below:
import numpy as np
p = np.array([1, 2, 3])
n = 10
p_n = np.tile(p, n).reshape(n, 3)
output of the code:
array([[1, 2, 3],
[1, 2, 3],
[1, 2, 3],
[1, 2, 3],
[1, 2, 3],
[1, 2, 3],
[1, 2, 3],
[1, 2, 3],
[1, 2, 3],
[1, 2, 3]])