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
Hello everyone. Thank you very much for your awesome project!
I am currently trying to compute the variance over some tensors but if I supply an axis to calculate the variance for, the program crashes. The following code reproduces this issue:
#include<iostream>
#include<xtensor/xarray.hpp>
#include<xtensor/xio.hpp>
#include<xtensor/xview.hpp>intmain(void) {
xt::xarray<float> arr = {{1.0f, 2.0f, 3.0f}, {4.0f, 5.0f, 6.0f}, {7.0f, 8.0f, 9.0f}};
std::cout << xt::variance(arr, {0}) << std::endl;
// terminate called after throwing an instance of 'std::bad_array_new_length'// what(): std::bad_array_new_length
std::cout << xt::variance(arr, {1}) << std::endl;
// terminate called after throwing an instance of 'std::bad_array_new_length'// what(): std::bad_array_new_length
}
Activity
spectre-ns commentedon May 13, 2024
What compiler are you using? I get the following output when using MSVC 2022 and Intel 2024
TheMrSheldon commentedon May 14, 2024
I am using g++13 within an Ubuntu 24.04 Docker image on an Intel CPU from around 2015 to 2016
Downgrade to C++17 and fix memory issues in xtensor
Downgrade to C++17 and fix memory issues in xtensor
Downgrade to C++17 and fix memory issues in xtensor
Downgrade to C++17 and fix memory issues in xtensor