How can I replicate numpy array, so that it would be repeated (as a whole array) n times?
So with an example array:
import numpy as np
x = np.arange(0, 5)
I want to create an array like below, without a need of manually typing np.arange(0, 5) n times:
x_3times = np.concatenate([np.arange(0, 5), np.arange(0, 5), np.arange(0, 5)])
or with a set length of output (e.g. 12)?
x_12 = np.concatenate([np.arange(0, 5), np.arange(0, 5), np.arange(0, 5)])[0:12]