(length, low=2, high=15, n=1)
Generate `n` random sequences of length `length` and yield with copies.
Generate `n` random sequences of length `length` and yield with copies.
Generate n random sequences of length length and yield with copies .
def copy_stream(length, low=2, high=15, n=1):
  """Generate `n` random sequences of length `length` and yield with copies."""
  while True:
    res = []
    for _ in range(n):
      seq = np.random.randint(low, high, size=(length,), dtype=np.int32)
      res.extend([seq, seq])
    yield res
def copy_stream ( length , low = 2 , high = 15 , n = 1 ) : while True : res = [ ] for _ in range ( n ) : seq = np . random . randint ( low , high , size = ( length , ) , dtype = np . int32 ) res . extend ( [ seq , seq ] ) yield res