def success(self, x, tol=1.e-5):
        val = self.fun(asarray(x))
        if abs(val - self.fglob) < tol:
            return True

        # the solution should still be in bounds, otherwise immediate fail.
        if np.any(x > np.asfarray(self.bounds)[:, 1]):
            return False
        if np.any(x < np.asfarray(self.bounds)[:, 0]):
            return False

        # you found a lower global minimum.  This shouldn't happen.
        if val < self.fglob:
            raise ValueError("Found a lower global minimum",
                             x,
                             val,
                             self.fglob)

        return False
Tests if a candidate solution at the global minimum.
dataset/ETHPy150Open scipy/scipy/benchmarks/benchmarks/go_benchmark_functions/go_benchmark.py/Benchmark.success