BendTensors.Flat.from_list: def of bend-tensors@0.0.0.2 Import: import bend-tensors@0.0.0.2/bend_tensors.bend as BendTensors Lines 1723-1725 of bend-tensors@0.0.0.2/bend_tensors.bend: https://jend.leeeet.dev/read.txt?path=bend-tensors@0.0.0.2/bend_tensors.bend&start_line=1723&end_line=1725 import Base # the first rows * cols of xs, row-major, the rest 0.0 def Flat.from_list(+rows: Nat, +cols: Nat, xs: List<&2, F32>) -> Flat: 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))} Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.new https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.take https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=bend-tensors@0.0.0.2/bend_tensors.bend&name=Flat https://jend.leeeet.dev/definition.txt?path=bend-tensors@0.0.0.2/bend_tensors.bend&name=Flat.count https://jend.leeeet.dev/definition.txt?path=bend-tensors@0.0.0.2/bend_tensors.bend&name=Flat.depth https://jend.leeeet.dev/definition.txt?path=bend-tensors@0.0.0.2/bend_tensors.bend&name=Flat.fill.go