@jit(nopython=True, cache=True)
def get_mixed_actions(tableaux, bases):
 nums_actions = (tableaux[1].shape[0], tableaux[0].shape[0])
 num = (nums_actions[0] + nums_actions[1])
 out = np.zeros(num)
 for (pl, (start, stop)) in enumerate(zip((0, nums_actions[0]), (nums_actions[0], num))):
  sum_ = 0.0
  for i in range(nums_actions[(1 - pl)]):
   k = bases[pl][i]
   if (start <= k < stop):
    out[k] = tableaux[pl][(i, (-1))]
    sum_ += tableaux[pl][(i, (-1))]
  if (sum_ != 0):
   out[start:stop] /= sum_
 return (out[:nums_actions[0]], out[nums_actions[0]:])

@ jit ( nopython = True , cache = True ) def get_mixed_actions ( tableaux , bases ) : nums_actions = ( tableaux [ 1 ] . shape [ 0 ] , tableaux [ 0 ] . shape [ 0 ] ) num = ( nums_actions [ 0 ] + nums_actions [ 1 ] ) out = np . zeros ( num ) for ( pl , ( start , stop ) ) in enumerate ( zip ( ( 0 , nums_actions [ 0 ] ) , ( nums_actions [ 0 ] , num ) ) ) : sum_ = 0.0 for i in range ( nums_actions [ ( 1 - pl ) ] ) : k = bases [ pl ] [ i ] if ( start <= k < stop ) : out [ k ] = tableaux [ pl ] [ ( i , ( - 1 ) ) ] sum_ += tableaux [ pl ] [ ( i , ( - 1 ) ) ] if ( sum_ != 0 ) : out [ start : stop ] /= sum_ return ( out [ : nums_actions [ 0 ] ] , out [ nums_actions [ 0 ] : ] )
from tableaux and bases .