MlbendPreprocess.mat_of_: def of mlbend-preprocess@0.1.0.0 Import: import mlbend-preprocess@0.1.0.0/main.bend as MlbendPreprocess Lines 125-131 of mlbend-preprocess@0.1.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=mlbend-preprocess@0.1.0.0/main.bend&start_line=125&end_line=131 import Base import bend-ml-tensor@0.1.0.0/main.bend as T # A matrix of r rows of c numbers, when there is one. def mat_of_(+r: Nat, +c: Nat, m: Maybe<&2, T.Mat>) -> T.Mat: match m: case Some{v}: v case None{}: T.Mat.fill(r, c, 0.0) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor@0.1.2.0/main.bend&name=Mat https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor@0.1.2.0/main.bend&name=Mat.fill