I have a list of numpy arrays e.g.
>>> list_of_mats = [np.array([[1, 2, 3],
[4, 5, 6]])]*2
>>> print(list_of_mats[0])
[[1 2 3]
[4 5 6]]
>>> print(list_of_mats[1])
[[1 2 3]
[4 5 6]]
Now, I want to modify the first row - first column element in the first numpy array (matrix), so I did something like this:
>>> list_of_mats[0][0, 0] = 7
But, it's modifying the first element in both arrays:
>>> print(list_of_mats[0])
[[7 2 3]
[4 5 6]]
>>> print(list_of_mats[1])
[[7 2 3]
[4 5 6]]
So, how can I modify only one numpy array in the list of numpy arrays?