Suppose the following code:
x = np.array([3,2])
y = [x,x]
z = np.array(y)
now z has two different copies of x which are different from the original x as well:
x[0] = 10
y
[array([10, 2]), array([10, 2])]
z
array([[3, 2], [3, 2]])
I need to save memory by just make z contains references to x not a copy of it, how to do it in numPy?