write_csv

write_csv#

Write an operator to a CSV file

Note

This function requires the optional MATX_ENABLE_FILEIO compile flag

template<typename TensorType>
void matx::io::write_csv(const TensorType &t, const std::string fname, const std::string delimiter)#

Write a CSV file from a tensor view

CSVs are currently written using the Python interpreter through pybind11. This has a startup performance hit, but CSV writing is intended to be a slow-path function, so this is not a critical component to speed up. Currently 1D and 2D tensors are supported only.

Template Parameters:

TensorType – Data type of tensor

Parameters:
  • t – Tensor to write data from

  • fname – File path of .csv file

  • delimiter – Delimiter to use for CSV file

Examples#

io::write_csv(this->Av, "temp.csv", ",");