The direct way to make the initial code work is to use copy_ to a view.
x.index_select(1, ind).copy_(x2)

This works in both Python and C++ (but I think sometimes you used to need to assign the view to a Tensor to make it work).