'Is a candidate solution at the global minimum'

def success(self, x):

    val = self.fun(x)
    if np.isnan(val):
        return True
    try:
        assert_almost_equal(val, 0.0, 4)
        return True
    except AssertionError:
        return False
    return False
