I have a code in matlab and I want to convert it to python. The matlab code is as follows:
options = optimoptions('fmincon','algorithm','interior-point','MaxIterations',500);
[theta,feval1,exitflag]=fmincon(@function,x0,A,b,Aeq,beq,lb,ub,nonlcon,options);
I searched for equivalent functions for fmincon in Python and found Scipy.optimize.fmin
, but when I tried to use it I got stuck in passing the variables. What I have so far is:
fmin(function, x0, args=Xdata, maxiter=500)
It is clear how to pass the function, the x0, and the number of iterations. but how about the other arguments (algorithm
, A
, b
, Aeq
, beq
, lb
, ub
, and nonlcon
)?