Dear community, I am having the following problem when I am assigning the elements of a vector below a certain number to zero or any other value. I am creating a new variable but Python edits the root variable. Why?
import numpy as np X=np.arange(1, 10000, 1) #root variable x1=X x1[x1<10000]=0 print(X) Out[1]: array([ 0., 0., 0., ..., 0., 0., 0.]) Why????????? It is supposed to be the original value Thank you for your time Rafael -- https://mail.python.org/mailman/listinfo/python-list