Skip to content
⌘K

xtensor

C++ tensors with broadcasting and lazy computing.

health 63contrib 833.8k

Overview & architecture

C++ standard
–
Build systems
cmake
License
BSD-3-Clause
Languages
C++
Last release
0.27.2 · Nov 11, 2026

Repository activity

snapshot Nov 22, 2026
GitHub stars
latest
3.8k▲ 8
Merged PRs (30d)
latest
7▲ 7
Contributors (90d)
latest
5▲ 4
Issue first response p50
–
No snapshots yet.
383 open issues64 open PRs1 releases / year7 commits (30d)0 good first issues11 help wanted

Recent notable activity

Stories

Maintainers & organizations

every claim links to its source

Maintainers

No maintainers recorded yet.

Top contributors

Releases & changelog

Contribution opportunities

0 published

No published opportunities

Cards are published only for real, open, unassigned issues with maintainer engagement.
5 more candidates below the publish threshold
LabelledstaleMatches your profileLinear Algebra & Numerical Computing

xt::pad error with GCC using c++-20

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.

40score
cpp20testing
  • Demand 25% × 0.00 = 00 reactions, 4 comments (not counted alone)
  • Technical fit 30% × 0.61 = 18xtensor is in HPC & Scientific (a focus area); issue needs cpp20, which you listed
  • Maintainer engagement 25% × 0.44 = 11comments not checked; labelled (triaged); project responsiveness 95%
  • Feasibility 20% × 0.55 = 11clear scope; has reproduction steps; has code; project onboarding 50%
Evidence
  • #2701 xt::pad error with GCC using c++-20issue
    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…
Suggested first step

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.

Rule-generated · updated 13d ago
LabelledstaleMatches your profileLinear Algebra & Numerical Computing

xt::tile 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"

33score
  • Demand 25% × 0.00 = 00 reactions, 3 comments (not counted alone)
  • Technical fit 30% × 0.40 = 12xtensor is in HPC & Scientific (a focus area)
  • Maintainer engagement 25% × 0.40 = 10comments not checked; labelled (triaged); project responsiveness 79%
  • Feasibility 20% × 0.55 = 11clear scope; has reproduction steps; has code; project onboarding 50%
Evidence
Suggested first step

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.

Rule-generated · updated 27d ago
LabelleduntouchedstaleMatches your profileLinear Algebra & Numerical Computing

Runtime crash in xtensor

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…

30score
windows
  • Demand 25% × 0.00 = 00 reactions, 2 comments (not counted alone)
  • Technical fit 30% × 0.40 = 12xtensor is in HPC & Scientific (a focus area)
  • Maintainer engagement 25% × 0.40 = 10comments not checked; labelled (triaged); project responsiveness 79%
  • Feasibility 20% × 0.40 = 8has reproduction steps; has code; project onboarding 50%
Evidence
  • #2861 Runtime crash in xtensorissue
    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"…
Suggested first step

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.

Rule-generated · updated 21d ago
LabelledstaleMatches your profileLinear Algebra & Numerical Computing

Avoiding temporary fails with xt::concatenate

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…

28score
testing
  • Demand 25% × 0.00 = 00 reactions, 3 comments (not counted alone)
  • Technical fit 30% × 0.40 = 12xtensor is in HPC & Scientific (a focus area)
  • Maintainer engagement 25% × 0.20 = 5comments not checked; labelled (triaged)
  • Feasibility 20% × 0.55 = 11clear scope; has reproduction steps; has code; project onboarding 50%
Evidence
  • #2819 Avoiding temporary fails with xt::concatenateissue
    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…
Suggested first step

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.

Rule-generated · updated Oct 13, 2026
LabelleduntouchedstaleMatches your profileLinear Algebra & Numerical Computing

division crashed "bad allocation"

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;

28score
memory
  • Demand 25% × 0.00 = 00 reactions, 1 comments (not counted alone)
  • Technical fit 30% × 0.40 = 12xtensor is in HPC & Scientific (a focus area)
  • Maintainer engagement 25% × 0.44 = 11comments not checked; labelled (triaged); project responsiveness 95%
  • Feasibility 20% × 0.25 = 5clear scope; project onboarding 50%
Evidence
Suggested first step

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.

Rule-generated · updated 13d ago

Why this score

Health 63Contribution friendliness 83computed 19h ago
  • Activity0.59
    7 merged PRs in 30 days (full marks at 20); 7 commits in 30 days (full marks at 60)health
  • Onboarding0.50
    has mainstream build (CMake/Bazel/Meson), CI; missing contributing guide, docs sitecontrib
  • Entry points1.00
    10 open, unassigned good-first-issue/help-wanted issues without a PR (full marks at 10)contrib
  • Maintainer responsiveness0.93
    median PR merge time 89 h (full marks within 72 h, zero after 60 days)healthcontrib
  • Release cadence0.77
    last release 12 days ago (full marks within 90, zero after 730); 1 releases in 365 days (full marks at 4)health
  • Backlog pressure0.00
    100% of 119 scanned open issues are older than a year (full marks at <= 20%, zero at >= 80%)health
  • Contributor breadth0.56
    5 unique contributors in 90 days (full marks at 25); top contributor has 56% of commits; stars count for at most 5% of this signalhealth

Each signal is normalized to 0–1 with fixed thresholds; scores are weighted sums × 100. Stars are not an input.