Parameters :
array: [array_like] Input array. repetitions: No. of repetitions of arr along each axis.
Return:
An array with repetitions of array  arr as per d, number of times we want to repeat arr
Code 1:

Output:
arr: [0 1 2 3 4] Repeating arr 2 times: [0 1 2 3 4 0 1 2 3 4] Repeating arr 3 times: [0 1 2 ..., 2 3 4]

Output:
arr: [0 1 2] Repeating arr: [[0 1 2 0 1 2] [0 1 2 0 1 2]] arr Shape: (2, 6) Repeating ar r: [[0 1 2 0 1 2] [0 1 2 0 1 2] [0 1 2 0 1 2]] arr Shape: (3, 6) Repeating arr: [[0 1 2 ..., 0 1 2] [0 1 2 ..., 0 1 2]] arr Shape: (2, 9)
Code 3: (repetitions == arr.ndim) == 0

Output:
arr: [[0 1] [2 3]] Repeating arr: [[0 1] [2 3] [0 1] [2 3]] arr Shape: (4, 2) Repeating arr: [[0 1 0 1] [2 3 2 3] [0 1 0 1] [2 3 2 3] [0 1 0 1] [2 3 2 3]] arr Shape: (6, 4) Repeating arr: [[0 1 0 1 0 1] [2 3 2 3 2 3] [0 1 0 1 0 1] [2 3 2 3 2 3]] arr Shape: (4, 6)
Links:
https://docs.scipy.org/doc/numpy/ reference / generated / numpy.tile.html
Notes:
These codes will not work for online IDs. Please run them on your systems to see how they work
This article is provided by Mohit Gupta_OMG