Aug-01-2019, 05:10 PM
I need the list of points (x,y) python uses to reach the minimum. But the best I can find at the moment is to output the x coordinates of the list of points as shown below
>>>[xopt, fopt, iter, funcalls, warnflag, allvecs] = optimize.fmin(eng,[-1],disp=True,retall=True,full_output=True)
>>> print(xopt)
[8.8817842e-16]
>>> for items in allvecs:
... print(items)
...
[-1.]
[-0.9]
[-0.7]
[-0.3]
[0.1]
[-0.1]
[8.8817842e-16]
Is there a different optimization function which might output both x and y coordinate of the optimization path? If not, then would it be feasible to tickle the source code of scipy to achieve this feature?
>>>[xopt, fopt, iter, funcalls, warnflag, allvecs] = optimize.fmin(eng,[-1],disp=True,retall=True,full_output=True)
>>> print(xopt)
[8.8817842e-16]
>>> for items in allvecs:
... print(items)
...
[-1.]
[-0.9]
[-0.7]
[-0.3]
[0.1]
[-0.1]
[8.8817842e-16]
Is there a different optimization function which might output both x and y coordinate of the optimization path? If not, then would it be feasible to tickle the source code of scipy to achieve this feature?