pallgeuer:

Yes it can and is not uncommon, try the code out.


Got it, I mistook what you said for a tensor which has zero as one of the dimensions.
The following seems to work for your problem:
t = torch.tensor(5)
print(t)
print(id(t))
t.copy_(torch.tensor(6))
print(t)
print(id(t))