using np.repeat

+2
PY
py
OUTPUT