xcsv: read/write CSV files

Defined in xtensor/xcsv.hpp

template<class T, class A = std::allocator<T>>
xcsv_tensor<T, A> xt::load_csv(std::istream &stream)

Load tensor from CSV.

Returns an xexpression for the parsed CSV

  • stream: the input stream containing the CSV encoded values

template<class E>
void xt::dump_csv(std::ostream &stream, const xexpression<E> &e)

Dump tensor to CSV.

  • stream: the output stream to write the CSV encoded values

  • e: the tensor expression to serialize