Solved by albanD in post #2 
              
              
                Hi, 
You have access to the .select() and .narrow() functions in cpp that can be used for this. 
You also have access to .index_select() and .index_copy_() to read and write given 1D indices 
The python code equivalent to yours is: 
x_slice = x.narrow(0, 3, 2)
x_slice.add_(win_sq.narrow(0, 0, 2))
ne…