I would like to execute the equivalent of the following MATLAB code using NumPy: repmat([1; 1], [1 1 1]). How would I accomplish this?
repmat([1; 1], [1 1 1])
Know both tile and repeat.
tile
repeat
x = numpy.arange(5) print numpy.tile(x, 2) print x.repeat(2)