I want replicate a small array to specific length array
Example:
var = [22,33,44,55] # ==> len(var) = 4 n = 13
The new array tha
var = [22,33,44,55] n = 13
Repeating a list (or any other iterable) can be done without numpy, using itertools's cycle() and islice() functions
numpy
itertools
cycle()
islice()
from itertools import cycle, islice var_new = list(islice(cycle(var),0,n)