parameters: (random, z)
return_statement: return inds[ind_max]
docstring: Returns argmax of flattened z with ties split randomly.
  
    Args:
      random: Random number generator, e.g., np.random.RandomState()
      z: np.array
    Returns:
      integer representing index of argmax
docstring_summary: Returns argmax of flattened z with ties split randomly.
docstring_tokens: Returns argmax of flattened z with ties split randomly .
function: def argmax(random, z):
    """Returns argmax of flattened z with ties split randomly.
  
    Args:
      random: Random number generator, e.g., np.random.RandomState()
      z: np.array
    Returns:
      integer representing index of argmax
    """
    inds = np.arange(z.size)
    random.shuffle(inds)
    z_shuffled = z[inds]
    ind_max = np.argmax(z_shuffled)
    return inds[ind_max]
function_tokens: def argmax ( random , z ) : inds = np . arange ( z . size ) random . shuffle ( inds ) z_shuffled = z [ inds ] ind_max = np . argmax ( z_shuffled ) return inds [ ind_max ]