def Flat.from_list

bend-tensors@0.0.0.2 · bend_tensors.bend:1723

import bend-tensors@0.0.0.2/bend_tensors.bend as BendTensors
import 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))}

Uses (9)

Used by (1)