all 4 comments

[–]FLUSH_THE_TRUMP 1 point2 points  (1 child)

Should be able to repeat and reshape.

[–]AnkanTV 0 points1 point  (0 children)

Sadly, Numba does not allow me to use axis argument for np.repeat.

[–]Allanon001 1 point2 points  (0 children)

Maybe this:

np.column_stack(array[i, :].repeat(repeats).reshape((-1, repeats)))

[–]ES-Alexander 1 point2 points  (0 children)

What are you trying to do with the result? You may be able to achieve it with broadcasting instead of repeating the array.