I am kind of a newbie in python and this puzzles me for a while.
I wrote the code below:
pool = np.array([[1,1],[1,1]])
def ringDisc(data):
data_new = data
data_new[1] = 0
return data_new
print(pool)
print(ringDisc(pool))
print(pool)
I expect the result should be [[1,1],[1,1]]
for the first "print" and [[1,1],[0,0]]
for the second "print" and [[1,1],[1,1]]
for the last.
But what I got from this is [[1,1],[1,1]]
; [[1,1],[0,0]]
; [[1,1],[0,0]]
.
could anyone help me with this and explain why my code doesn't work out in the way I want? thank a lot!