def Mat.flatten

bend-ml-tensor@0.1.2.0 · main.bend:499

import bend-ml-tensor@0.1.2.0/main.bend as BendMlTensor
import Base

499# Mat<r, c> -> Mat<1, r*c>: the proof comes from the law above
500def Mat.flatten(+r: Nat, +c: Nat, a: Mat<r, c>) -> Mat<1n, Nat.mul(r, c)>:
501  Mat.reshape(r, c, 1n, Nat.mul(r, c), reshape_flat(r, c), a)

Uses (5)

Used by (0)

No other definition uses this definition.