When i am trying to create a numpy array and i tired manipulating it using splicing .ideals spliced array and original array should remain same but it is not .Why?
a = np.array([[1,2,3,4], [5,6,7,8], [9,10,11,12]])
i have taken this array i will splice now and update its value
c = a[:2,1:3]
c[0,0] = 99
now the value of a also gets updated at its respective position in python this happens only when the address is same
when i am checking id of each it shows different
print(id(c),id(a))
output :
139866833241552 139866835761152