xtensor
xtensor copied to clipboard
xt::tile An uncaught exception occurred: std::bad_alloc
version is 0.24.6
xt::xarray<int> t{{1, 2}, {3, 4}};
std::vector<int> rep = {2, 3};
auto tb = xt::tile(t, rep);
for(auto b : tb.shape())
std::cout << b << " ";
std::cout << std::endl;
it will get an error "An uncaught exception occurred: std::bad_alloc"
Thanks for reporting. Just to make sure, tb.shape(0)
and tb.shape(1)
give what?
exception is happend in xt::tile. so cannot get tb.shape
i use debug tool to trace, there is some clue. when t.dim >= 4, xt::tile is work well. i remember that "compute_size" get alloc size wrong. dim is 2, but compute_size will get 4.