I have a list of values with length 10:
p = [1, 2, ..., 10]
This list corresponds to the second dimension of a 4D array (called T):
Tshp = np.shape(T)
print(Tshp)
(20, 10, 30, 40)
I need to create an array of the same size as T with the list p repeated over all the other dimensions.
I have tried:
new_p = np.tile(p, [Tshp[0], Tshp[2], Tshp[3]])
But I get something of size:
print(np.shape(new_p))
(20, 30, 400)