What's going on here? I'm sure there's a simple solution/fact I'm overlooking. I just can't understand why I can't save values/changes to a NumPy array in this manner.
>>> import numpy as np
>>> memoize = []
>>> parameters = np.array([1, 2]).astype(np.float64)
>>> memoize.append(parameters)
>>> parameters -= np.array([0.5, -0.5])
>>> memoize.append(parameters)
>>> memoize
[array([ 0.5, 2.5]), array([ 0.5, 2.5])]
I expected the answer to be
[array([ 1., 2.]), array([ 0.5, 2.5])]
Does it have anything to do with a list being mutable ?