Minimal code to reproduce:
#include <iostream> #include <xtensor/xtensor.hpp> #include <xtensor/xsort.hpp> int main() { xt::xtensor<double, 1> xtest{0, 1, 2, 3, 4}; std::cout << xt::argmax(xtest)(0) << std::endl; std::cout << xt::argmax(xtest, 0)(0) << std::endl; return 0; }
0.24.1 output:
4 4
0.24.2 output:
4 0
With the debugger I noticed that the compare function is ignored if dimension is 1 and an argmin implementation is called:
Thanks for reporting. This is clearly a bug
Activity
tdegeus commented on Jul 26, 2022
Thanks for reporting. This is clearly a bug