scijit.optimize.OptimizeWarning

exception scijit.optimize.OptimizeWarning

Bases: UserWarning

Warning category for recoverable problems during optimization.

See also

scipy.optimize.OptimizeWarning

The scipy category this mirrors.

Notes

This is a DIFFERENT CLASS from scipy.optimize.OptimizeWarning, with the same name and the same base. A filter naming this class selects it, and so does one naming UserWarning or a bare warnings.catch_warnings(record=True). A filter naming scipy’s class does NOT: simplefilter('error', scipy.optimize.OptimizeWarning) leaves this warning as a warning, and except scijit.optimize.OptimizeWarning does not catch a scipy one. Ported code that turns scipy’s class into an exception has to name this one as well. Importing scipy’s would put scipy in this package’s runtime dependencies, which it is not.

curve_fit is the one site that raises it here, on the branch where the covariance could not be estimated. scipy also raises it for an unknown solver option and from several linprog and fminbound conditions.