pythonscipyscipy-optimizefixed-point-iteration

Fastest way to compute large amount of fixed points in python?


I have a large amount of one-dimensional nonlinear fixed point problems to solve, what is the most efficient numerical solver? I'm currently using scipy.optimize.fixed_point, it takes around 17s to run 1000 of my tasks. Thanks for any suggestions.


Solution

  • If these are all 1D, you can take the fixed_point source, https://github.com/scipy/scipy/blob/v1.5.2/scipy/optimize/minpack.py#L876 simplify it (can decide once on the acceleration strategy, no need for _lazywhere etc) and compile it with either cython or numba.