def Flat.argmax.of

bend-tensors@0.0.0.2 · bend_tensors.bend:2086

import bend-tensors@0.0.0.2/bend_tensors.bend as BendTensors
import Base

2086def Flat.argmax.of(+rows: Nat, +cols: Nat, a: Array<F32>) -> List<&2, U32>:
2087  match rows:
2088    case 0n:
2089      []
2090    case 1n+p:
2091      +colsu = U32.from_nat(cols)
2092      +last = (U32.from_nat(p) * colsu : U32)
2093      Flat.argmax.go(p, cols, colsu, last, Flat.argmax.row(cols, last, a), [])

Uses (9)

Used by (1)