0

I'm solving a fixed point problem by using scipy.optimize.fixed_point(), however the algorithm is not converging and I am not sure what's going on.

I have found other references online on how to print number of iterations, errors and so on when using scipy.optimize.minimize or similar, but nothing for fixed_point(), which does not have an options nor a callback argument. Would someone have any tips?

Tom
  • 1
  • `which does not have an options nor a callback argument` It does have a callback, though. The first argument is a function which is called for every iteration. You can print whatever you want in that. – Nick ODell Nov 22 '22 at 21:44
  • thanks, i can use this to print the number of iterations, but how would I go about printing the error of the optimizer? I cannot put that in the function to optimize – Tom Nov 22 '22 at 21:52
  • Why not? You know what value your function was called with. You know what value it will return. You can do one minus the other. – Nick ODell Nov 22 '22 at 21:54

0 Answers0