def npy_opened
import stelliferous@0.0.2.0/tensor_file.bend as TensorFileimport 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)