def save
import stelliferous@0.0.2.0/tensor_file.bend as TensorFileimport Base
import stelliferous@0.0.2.0/tensor.bend as Tensors
import stelliferous@0.0.2.0/tensor_layout.bend as Layout
383# Writes the values in row-major order and returns the tensor. A failed tensor
384# writes nothing and keeps its problem.
385def save(+path: String,tensor: Tensor()) -> IO(Tensor()):
386 Tensors.then(~Tensor(),~Tensor(),~IO(Tensor()),Layout.copy(~F32,tensor),kept => copy => saving("save",path,kept,[],Tensors.into_storage(~F32,copy)))