[][src]Function concrete_lib::operators::math::tensor::write_in_file_ftorus

pub fn write_in_file_ftorus(tensor: &[FTorus], path: &str) -> Result<()>

Writes in a compact way a tensor of FTorus elements inside a file

Arguments

  • tensor - FTorus slice
  • path - string containing the path of the file we write in

Example

use concrete_lib::operators::math::tensor;
use concrete_lib::types::FTorus;

// setting
let size: usize = 128;

// create a tensor
let mut tensor: Vec<FTorus> = vec![0.; size];

// ... (fill the tensor)

// writes in a file
tensor::write_in_file_ftorus(&tensor, "test_read_write_ftorus.txt");