def read
import bendtorch-load@1.3.0.0/main.bend as BendtorchLoadimport Base
import bend-ml-binary-read@0.2.0.0/main.bend as R
134# A raw, exact-size little-endian F32 file, read once into one source array: up to 2^32 - 1 numbers (16 GiB).
135def read(+path: String, +n: U32) -> IO(Array<F32>):
136 do IO<Array<F32>>:
137 f : File <- IO.try(File, File.open(path, "r"))
138 rr : File & Result<&1, &1, U32 & String, U32 & U32> <- R.size64(f)
139 read_sized(path, n, rr)