def Flat.from_list
import bend-tensors@0.0.0.2/bend_tensors.bend as BendTensorsimport Base
1723# the first rows * cols of xs, row-major, the rest 0.0
1724def Flat.from_list(+rows: Nat, +cols: Nat, xs: List<&2, F32>) -> Flat<rows, cols>:
1725 FlatS{Flat.fill.go(List.take(&2, F32, xs, Flat.count(rows, cols)), 0, Array.new(F32, Flat.depth(Flat.count(rows, cols)), 0.0))}