hawk.math.argmax

Contents

hawk.math.argmax#

hawk.math.argmax(v, /, *components)[source]#

The index (rank-0 i32) of the first maximum: of a rank-1 value (argmax(logits)), of a Python list of rank-0 values, or of rank-0 components given positionally (argmax(a, b, c)).

A select chain over the components — no new op kind. Ties go to the lower index, as np.argmax; a NaN component never wins. The index literals are minted through index_node(), the i32 spelling, since a bare int in a body is the real number.

Return type:

Value

Parameters:
  • v (Any)

  • components (Any)