@njit
def _repeat_1d(x, K, out):
 N = x.shape[0]
 L = (out.shape[0] // (K * N))
 for n in range(N):
  val = x[n]
  for k in range(K):
   for l in range(L):
    ind = ((((k * N) * L) + (n * L)) + l)
    out[ind] = val

@ njit def _repeat_1d ( x , K , out ) : N = x . shape [ 0 ] L = ( out . shape [ 0 ] // ( K * N ) ) for n in range ( N ) : val = x [ n ] for k in range ( K ) : for l in range ( L ) : ind = ( ( ( ( k * N ) * L ) + ( n * L ) ) + l ) out [ ind ] = val
repeats each element of a vector many times and repeats the whole result many times parameters x: vector to be repeated k: number of times each element of x is repeated out: placeholder for the result returns none .