estimator.util.local_minimum.update

estimator.util.local_minimum.update#

local_minimum.update(res)#

TESTS:

We keep cache old inputs in _all_x to prevent infinite loops:

>>> from estimator.util import binary_search
>>> from estimator.cost import Cost
>>> f = lambda x, log_level=1: Cost(rop=1) if x >= 19 else Cost(rop=2)
>>> binary_search(f, 10, 30, "x")
rop: 1