How come this works?
import numpy as np
a = np.ones(5)
b = torch.from_numpy(a).float()   # because we change the dtype 'b' contains a copy of  'a' 
np.add(a, 1, out=a) 

print(a, a.dtype)
>>> [2. 2. 2. 2. 2.] float64

print(b, b.dtype)
>>> tensor([1., 1., 1., 1., 1.]) torch.float32

Secondly, this works as expected:
import numpy as np
a = np.ones(5)
b = torch.from_numpy(a)
np.add(a, 1, out=a) # changed to np array, changes the torch.tensor

print(a, a.dtype)
>>> [2. 2. 2. 2. 2.] float64

print(b, )
>>> tensor([2., 2., 2., 2., 2.], dtype=torch.float64)