I'm having an issue with IPython. I can't seem to find any related issues online (perhaps due to inadequate description).
Here's an example from an IPython session using Numpy as np:
x1 = np.array([1.0, 1.0, 1.0, 1.0])
x2 = x1
x2[2] = x2[2] + 0.01
Now, if I look within the session at what's stored in x1
and x2
, I see the same thing for both:
array([1. , 1. , 1.01, 1. ])
Why is the value within x1
also being updated here?