xtensor
« Back to VersTracker
Description:
Multi-dimensional arrays with broadcasting and lazy computing
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: c++ numerical-computing numpy math header-only
Install: brew install xtensor
About:
Xtensor is a C++ library offering N-dimensional arrays compatible with NumPy's syntax, featuring lazy evaluation and broadcasting. It enables high-performance numerical computing by leveraging expression templates to optimize operations and avoid unnecessary temporary allocations. The library provides a rich API for algebraic operations and seamless interoperability with other scientific computing tools.
Key Features:
  • Lazy evaluation with expression templates for performance
  • Broadcasting and universal functions (ufuncs)
  • Python bindings via xtensor-python
  • STL-compatible and header-only
Use Cases:
  • Scientific computing and numerical analysis in C++
  • Bridging high-performance C++ algorithms with Python
Alternatives:
  • Eigen – Focuses on linear algebra; lacks NumPy-style broadcasting and lazy evaluation
  • Blaze – High-performance math library; more focused on dense and sparse linear algebra
Version History
Detected Version Rev Change Commit