def Flat.from_file
import bend-tensors@0.0.0.2/bend_tensors.bend as BendTensorsimport Base
1730# rows * cols float32 from a file, row-major
1731def Flat.from_file(+rows: Nat, +cols: Nat, path: String) -> IO(Flat<rows, cols>):
1732 IO.bind(Array<F32>, Flat<rows, cols>, IO.try(Array<F32>, Flat.load.eff(path, (U32.from_nat(rows) * U32.from_nat(cols) : U32))), a => Flat.wrap(rows, cols, a))
Uses (13)
Used by (0)
No other definition uses this definition.