Numpy Repeat Elements In Array Matlab Function