Skip to content

Function value convergence test for brent_max #442

Closed
@QBatista

Description

@QBatista

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions