def Mat.from_rows

bend-tensors@0.0.0.2 · bend_tensors.bend:1430

import bend-tensors@0.0.0.2/bend_tensors.bend as BendTensors
import Base

1430# a matrix from its rows, row-major; short or missing rows pad with 0.0
1431def Mat.from_rows(+rows: Nat, +cols: Nat, rs: List<&2, List<&2, F32>>) -> Mat<rows, cols>:
1432  MatS{MatT.mask(VecT.depth(rows), VecT.depth(cols), MatT.from_rows(VecT.depth(rows), VecT.depth(cols), MatT.rows_take(cols, List.take(&2, List<&2, F32>, rs, rows))), 0n, 0n, rows, cols)}

Uses (9)

Used by (0)

No other definition uses this definition.