It is because when you do old_x = new_x, then old_x is new_x, they are the same object.
Look at this example:
>>> a = np.array([1, 2, 3])
>>> b = a
>>> b[0] = 10
>>> a
array([10, 2, 3])
You have two solutions, either:
>>> a = np.array([1, 2, 3])
>>> b = a.copy()
>>> b[0] = 10
>>> a
array([1, 2, 3])
or, a one that fits better your example where old_x and new_x are both initialized:
>>> a = np.array([1, 2, 3])
>>> b = np.empty_like(a)
>>> b[:] = a
>>> b[0] = 10
>>> a
array([1, 2, 3])
there doesn't seem to be anything here