I know it's related to the other question through the site, but I can't figure out what is the problem.
from scipy.optimize import minimize
def fun1(x,Cnoi,M):
return np.linalg.norm(Cnoi - np.matmul(M,x))**2
minimize(fun1, x0, Cnoi, M, method='SLSQP', bounds=bnds, constraints=cons)
returns
TypeError: minimize() got multiple values for argument 'method'
I don't understand what is the problem, since fun1 has three "positional" arguments.