@Shisho_Sama: almost. You got it right, given dim=0  (i.e. row in this case). But if dim=1 (i.e. column), the source row position would be maintained, and the indices would be used to specify the column position in destination.
Essentially, think of ‘dim’ with ‘index’, and keep everything else in output the same as in ‘src’.