def npy_opened

stelliferous@0.0.2.0 · tensor_file.bend:283

import stelliferous@0.0.2.0/tensor_file.bend as TensorFile
import Base

283def npy_opened(result: Result<&1,&1,U32 & String,File>,+path: String) -> IO(Tensor()):
284  match result:
285    case Fail{error}: IO.pure(Tensor(),fault("load_npy",path,"cannot be opened",[]))
286    case Done{file}:
287      do IO<Tensor()>:
288        read : Read() <- File.read_bytes(file,(chunk() * 4 : U32))
289        npy_headed(read,path)

Uses (16)

Used by (1)