def repeat_last_axis(array, count):
 return as_strided(array, (array.shape + (count,)), (array.strides + (0,)))

def repeat_last_axis ( array , count ) : return as_strided ( array , ( array . shape + ( count , ) ) , ( array . strides + ( 0 , ) ) )
restride array to repeat count times along the last axis .