def _is_epsilon_nash(x, g, epsilon, indptr=None):
 if (indptr is None):
  indptr = np.empty((g.N + 1), dtype=int)
  indptr[0] = 0
  indptr[1:] = np.cumsum(g.nums_actions)
 action_profile = _get_action_profile(x, indptr)
 return g.is_nash(action_profile, tol=epsilon)

def _is_epsilon_nash ( x , g , epsilon , indptr = None ) : if ( indptr is None ) : indptr = np . empty ( ( g . N + 1 ) , dtype = int ) indptr [ 0 ] = 0 indptr [ 1 : ] = np . cumsum ( g . nums_actions ) action_profile = _get_action_profile ( x , indptr ) return g . is_nash ( action_profile , tol = epsilon )
determine whether x is an epsilon-nash equilibrium of g .