Closed
Description
Without a function value convergence test, brent_max
can fail on simple functions, for instance:
>>> import quantecon as qe
>>> import numpy as np
>>> from numba import njit
>>> @njit
... def f(x): return 1.
...
>>> qe.optimize.brent_max(f, -np.inf, np.inf)
(nan, 1.0, (0, 1))
Adding a function value convergence test should solve this issue.
Metadata
Metadata
Assignees
Labels
No labels