I am trying to call a method multiple times with the use of a for loop but change the value of a variable (i) that will be passed into the method (method1) on every iteration. I planned to do this within a for loop but keep getting the error:
TypeError: 'numpy.ndarray' object is not callable
I have looked at other similar issues but none seem to resolve my issue or provide a way to still call the method in the way I desire.
array = np.array([1, 63, 96, 122, 35, 52, 67, 0.01])
for i in array:
result = method1(collection, data, i)
method1= price.dot(result)
Any help with this would be much appriciated!
method1really a function? Might it be a numpy array (by mistake)? Or does the error occur insidemethod1? You might need to show the full error and traceback.