You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using xt::get_rank to detect the rank of various XTensor objects, we noticed that the following test fails:
template <class EC, size_t N, xt::layout_type L, class Tag>
void check_adapt_tensor(xt::xtensor_adaptor<EC, N, L, Tag>& x) {
REQUIRE(xt::get_rank<decltype(x)>::value == N);
}
TEST_CASE("xt::get_rank", "[xtensor]") {
std::array<size_t, 3> shape{3, 2, 4};
xt::xtensor<double, 3> a(shape);
auto a_view = xt::adapt(a.data(), a.size(), xt::no_ownership(), shape);
check_adapt_tensor(a_view);
}
Naively, this is unexpected, because xt::xtensor_adaptor to my understanding has a compile-time constant rank and N is one of the template arguments of the class. Which is different from xt::xarray_adaptor which doesn't have a compile-time constant rank.
The text was updated successfully, but these errors were encountered:
While using
xt::get_rank
to detect the rank of various XTensor objects, we noticed that the following test fails:Naively, this is unexpected, because
xt::xtensor_adaptor
to my understanding has a compile-time constant rank andN
is one of the template arguments of the class. Which is different fromxt::xarray_adaptor
which doesn't have a compile-time constant rank.The text was updated successfully, but these errors were encountered: