There are currently two different functions that more or less convert a TensorWrapper to a std::vector<double>. to_vector_from_pimpl lives in src/tensorwrapper/tensor/detail_/pimpl.cpp, and to_vector is in include/tensorwrapper/tensor/conversions.hpp. These two should be consolidated into a single function.