Is it possible to define a dataframe in xtensor with multiple data types

Viewed 103

I am playing around with xtensor for one of my projects. The basic example of xtensor looks something like this.

xt::xarray<double> arr1{{1.0, 2.0, 3.0},
                        {2.0, 5.0, 7.0},
                        {2.0, 5.0, 7.0}};

xt::xarray<double> arr2{5.0, 6.0, 7.0};

xt::xarray<double> res = xt::view(arr1, 1) + arr2;

std::cout << res;

But I was wondering if it is also possible to have multiple data types within the same array. For example, is it possible to have something like this.

xt::xarray<double, double, string> arr1{{1.0, 2.0, "Name1"},
                        {2.0, 5.0, "Name2"},
                        {2.0, 5.0, "Name3"}};

Something similar.

0 Answers
Related