I noticed what I find to be surprising behaviour: if I index a tensor with a python tuple, I get an alias of the indexed element, but if I index with a python list, I get a copy:

t = torch.rand(3,5)
print(t[1,2].data_ptr())
idx = (1,2)
print(t[idx].data_ptr())
idx = [1,2]
print(t[idx].data_ptr())

Output:
94484139998412
94484139998412 
94484140672144

Is this expected behaviour? I gather that indexing with a tuple is identical to directly indexing an element, so returning a reference/alias makes sense.
Am I to understand that a python list is converted to a tensor, and that tensor indexing with a non-zero-dim tensor results in a copy? If so, this discussion around indexing with zero-dim tensors seems relevant here.
There’s also this post 3 on a possibly related confusion.