SciPy

scipy.odr.odr_stop

exception scipy.odr.odr_stop[source]

Exception stopping fitting.

You can raise this exception in your objective function to tell scipy.odr to stop fitting.