linalg:one-hot
(linalg:one-hot indices n &optional element-type)
Returns the (length indices) x n one-hot matrix: row i holds 1.0 in column indices[i] (truncated to an integer) and 0.0 elsewhere -- the label-encoding step for a classification loss. Double by default; pass 'single-float for a packed #f result. linalg:gather goes the other way, picking one element per row by index.