def Flat.from_file

bend-tensors@0.0.0.2 · bend_tensors.bend:1730

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