Because a = a * 10 is not an in-place operation: It creates a new tensor containing the result of a*10 then associate it with the python variable a. If you want to do this change in-place, you can do a *= 10.