Solved by albanD in post #2 
              
              
                if arr is a torch tensor, then assiging into arr[i] will copy the data inplace in the tensor. 
So yes this is an inplace operation.