BendTensors.Flat.argmax.of: def of bend-tensors@0.0.0.2 Import: import bend-tensors@0.0.0.2/bend_tensors.bend as BendTensors Lines 2086-2093 of bend-tensors@0.0.0.2/bend_tensors.bend: https://jend.leeeet.dev/read.txt?path=bend-tensors@0.0.0.2/bend_tensors.bend&start_line=2086&end_line=2093 import Base def Flat.argmax.of(+rows: Nat, +cols: Nat, a: Array) -> List<&2, U32>: match rows: case 0n: [] case 1n+p: +colsu = U32.from_nat(cols) +last = (U32.from_nat(p) * colsu : U32) Flat.argmax.go(p, cols, colsu, last, Flat.argmax.row(cols, last, a), []) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.from_nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul https://jend.leeeet.dev/definition.txt?path=bend-tensors@0.0.0.2/bend_tensors.bend&name=Flat.argmax.go https://jend.leeeet.dev/definition.txt?path=bend-tensors@0.0.0.2/bend_tensors.bend&name=Flat.argmax.row