xtensor 0.27.2 released
xtensor 0.27.2
Why it matters: First release in 14 months. xtensor is in HPC & Scientific (one of your focus areas).

C++ tensors with broadcasting and lazy computing.
xtensor 0.27.2
Why it matters: First release in 14 months. xtensor is in HPC & Scientific (one of your focus areas).
No published opportunities
Test case: c++ #include #include #include #include int main() { xt::xarray tensor = {1, 2, 3}; tensor = xt::pad(tensor, {1, 1}); std::cout << tensor << std::endl; return 0; } Compile with g++ -std=c++20 -o pad pad.cpp Result: terminate called after throwing an instance of 'std::bad_array_new_length' what(): std::bad_array_new_length This is with GCC 11 and xtensor 0.23.10, though I've been able to reproduce this with the latest versions of both (GCC 13 and xtensor 0.24.6). I've noticed this issue does not occur when compiling with clang, so it's possible the issue is with GCC itself.
Test case: c++ #include #include #include #include int main() { xt::xarray tensor = {1, 2, 3}; tensor = xt::pad(tensor, {1, 1}); std::cout << tensor << std::endl; return 0; } Compile with g++ -std=c++20 -o pad pad.cpp Result: terminate called after throwing an instance of…
Reproduce the bug on the latest main branch of xtensor, reduce it to a minimal example, and post your findings on the issue before opening a PR.
version is 0.24.6 cpp xt::xarray t{{1, 2}, {3, 4}}; std::vector 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"
version is 0.24.6 cpp xt::xarray t{{1, 2}, {3, 4}}; std::vector 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"
Reproduce the bug on the latest main branch of xtensor, reduce it to a minimal example, and post your findings on the issue before opening a PR.
Environment: xtensor: 0.25.0 xtl: 0.7.7 xsimd: 13.2.0 OS: Windows 11 24H2 Compiler: MSVC 19.44 (Visual Studio 2022) C++ Standard: C++14 Compilation flags: text /permissive- /ifcOutput "x64\Release\" /GS /GL /W3 /Gy /Zc:wchar_t /I"xtensor-0.25.0\include" /I"xtl-0.7.7\include" /I"xsimd-13.2.0\include" /Zi /Gm- /Od /Ob0 /sdl /Fd"vc143.pdb" /Zc:inline /fp:precise /D "XTENSOR_USE_XSIMD" /D "NDEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /errorReport:prompt /WX- /Zc:forScope /Gd /Oi /MD /std:c++17 /FC /Fa"x64\Release\" /EHsc /nologo /Fo"x64\Release\" /Fp"demo.pch" /diagnostics:column /utf-8…
Environment: xtensor: 0.25.0 xtl: 0.7.7 xsimd: 13.2.0 OS: Windows 11 24H2 Compiler: MSVC 19.44 (Visual Studio 2022) C++ Standard: C++14 Compilation flags: text /permissive- /ifcOutput "x64\Release\" /GS /GL /W3 /Gy /Zc:wchar_t /I"xtensor-0.25.0\include" /I"xtl-0.7.7\include"…
Reproduce the bug on the latest main branch of xtensor, reduce it to a minimal example, and post your findings on the issue before opening a PR.
When using -DXTENSOR_FORCE_TEMPORARY_MEMORY_IN_ASSIGNMENTS=Off, the following simple test fails: TEST(xbuilder, concatenate_assign_to_argument) { xt::xarray a = xt::ones ({ 4 }); xt::xarray b = xt::ones ({ 3 }); a = xt::concatenate(xt::xtuple(a, b)); ASSERT_EQ(a, xt::ones ({7})); } Instead of containing 7 ones, a will contain garbage. I have searched for the root cause of the issue, and found the following: Changing overlapping_memory_checker_traits for xgenerator, so check_overlap returns true instead of false, solves the issue. The change is in line 90 of xgenerator.hpp. The problem occurs…
When using -DXTENSOR_FORCE_TEMPORARY_MEMORY_IN_ASSIGNMENTS=Off, the following simple test fails: TEST(xbuilder, concatenate_assign_to_argument) { xt::xarray a = xt::ones ({ 4 }); xt::xarray b = xt::ones ({ 3 }); a = xt::concatenate(xt::xtuple(a, b)); ASSERT_EQ(a, xt::ones…
Reproduce the bug on the latest main branch of xtensor, reduce it to a minimal example, and post your findings on the issue before opening a PR.
I am using a 4D tensor, like typedef xt::xtensor T4; when i am doing divsion like: T4 a, b; // with some initialization and a = a/b; (i make sure no zeros in b); this expression crashed;
I am using a 4D tensor, like typedef xt::xtensor T4; when i am doing divsion like: T4 a, b; // with some initialization and a = a/b; (i make sure no zeros in b); this expression crashed;
Reproduce the bug on the latest main branch of xtensor, reduce it to a minimal example, and post your findings on the issue before opening a PR.
Each signal is normalized to 0–1 with fixed thresholds; scores are weighted sums × 100. Stars are not an input.