vt::asxarray#

template<typename T, size_t N, xt::layout_type L>
xt::xarray<T> vt::asxarray(const Tensor<T, N> &tensor)#

Copy a tensor from device to host array.

Template Parameters:
  • T – Data type of the tensor.

  • N – Number of dimensions of the tensor.

  • L – Layout type of the tensor.

Parameters:

tensor – The tensor object.

Returns:

xt::xarray<T>: Host array.