I am coding a neural network in python, and need to adjust my weights. In order to do so, I need to add my change variable to an element of my weights array. However, I don't know how to do this. The code would look like:
weights = numpy.array([1, 2, 3])
change = 1
weights[0]+= change
print(weights)
-- [2, 2, 3]
I have tried this, but it does not seem to work. Thanks in advance for any answers.