# xtensor-stack/xtensor

C++ tensors with broadcasting and lazy computing

Repository: https://github.com/xtensor-stack/xtensor
Canonical: https://ross.abutalabs.com/products/xtensor
Homepage: https://xtensor.readthedocs.io/en/latest/?badge=latest
Language: C++
License: BSD-3-Clause
License Family: permissive
Topics: c-plus-plus-14, numpy, multidimensional-arrays, tensors, c-plus-plus-17, c-plus-plus-20, xsimd-library
Last push: 2026-07-15T13:17:38+00:00

## Health v2 (maintenance only)
Score: 74/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 92, release rhythm 35, longevity 100
- inputs: {"age_days": 3594, "days_push": 49, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3762, forks 441 (observed 2026-08-28T04:08:17.954227+00:00)

## What it is
A header-only C++ library for numerical analysis with multi-dimensional array expressions, offering lazy broadcasting and a NumPy-inspired API. It integrates with Python, Julia, and R arrays via buffer protocol bindings.

## Use cases
- perform numpy-style tensor math in C++
- lazy broadcasting of multidimensional arrays
- process NumPy arrays in place from C++
- vectorized numerical computations with SIMD
- build scientific computing tools in C++

## When to choose
- you need NumPy-like array semantics in C++
- you want lazy evaluation to avoid temporary allocations
- you need cross-language interop with Python/Julia/R arrays

## When to avoid
- you need GPU tensor operations like PyTorch or TensorFlow
- you only need simple linear algebra where Eigen suffices
- your project cannot use C++17/20 compilers

## Facets
- artifact type: library
- maturity: active
- function: math, data-science, machine-learning
- domain: data-science, performance
- platform: cpp, cross-platform, python
- tags: tensors, multidimensional-arrays, numpy, lazy-evaluation, broadcasting, header-only, numerical-computing, xsimd, algorithms

## Member repositories
- xtensor-stack/xtensor (main) score 74

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:17.954227+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:28:53.058660+00:00, confidence not recorded.
  - readme: https://github.com/xtensor-stack/xtensor (fetched 2026-08-28T04:08:17.954227+00:00, sha e15a883c658e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
