I'm trying to add different arrays in Python to an empty list x by using x.append(). This is what I did:
x = []
y = np.zeros(2)
for i in range(3):
y += 1
x.append(y)
x
[array([3., 3.]), array([3., 3.]), array([3., 3.])]
The problem as you see is that it repeats the last result, and what I want is to get a list with different arrays within, such as: [[3., 3.],[4., 4.], [5., 5.]]
.