问题 This question already has answers here : Repeating each element of a numpy array 5 times (2 answers) Closed last year . I have a numpy.ndarray with True / False : import numpy as np a = np.array([True, True, False]) I want: out = np.array([True, True, False, True, True, False, True, True, False]) I tried: np.repeat(a, 3, axis = 0) But it duplicates each element, I want to duplicate the all array. This is the closes I got: np.array([a for i in range(3)]) However, I want it to stay as 1D. Edit