def onehot.row

bend-ml-autograd@0.1.1.0 · main.bend:247

import bend-ml-autograd@0.1.1.0/main.bend as BendMlAutograd
import Base

247def onehot.row(c: Nat, +k: Nat, +j: Nat) -> List<&2, F32>:
248  match c:
249    case 0n:
250      Nil{}
251    case 1n+p:
252      onehot.cell(Nat.is_eq(k, j)) <> onehot.row(p, k, 1n+j)

Uses (5)

Used by (1)