Skip to content

Commit

Permalink
support_enumeration: Remove any()
Browse files Browse the repository at this point in the history
Allow `cache=True`, close #285
  • Loading branch information
oyamad committed May 28, 2017
1 parent 20da0f8 commit e7bcb02
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions quantecon/game_theory/support_enumeration.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def _support_enumeration_gen(payoff_matrix0, payoff_matrix1):
_next_k_array(supps[0])


@jit(nopython=True)
@jit(nopython=True, cache=True)
def _indiff_mixed_action(payoff_matrix, own_supp, opp_supp, A, out):
"""
Given a player's payoff matrix `payoff_matrix`, an array `own_supp`
Expand Down Expand Up @@ -161,8 +161,9 @@ def _indiff_mixed_action(payoff_matrix, own_supp, opp_supp, A, out):
r = _numba_linalg_solve(A, out)
if r != 0: # A: singular
return False
if (out[:-1] <= 0).any():
return False
for i in range(k):
if out[i] <= 0:
return False
val = out[-1]

if k == m:
Expand Down

0 comments on commit e7bcb02

Please sign in to comment.