Multi-dimensional arrays with broadcasting and lazy computing.
Introduction¶
xtensor is a C++ library meant for numerical analysis with multi-dimensional array expressions.
xtensor provides
an extensible expression system enabling lazy broadcasting.
an API following the idioms of the C++ standard library.
tools to manipulate array expressions and build upon xtensor.
Containers of xtensor are inspired by NumPy, the Python array programming library. Adaptors for existing data structures to be plugged into the expression system can easily be written.
In fact, xtensor can be used to process NumPy data structures in-place using Python’s buffer protocol. For more details on the NumPy bindings, check out the xtensor-python project. Language bindings for R and Julia are also available.
xtensor requires a modern C++ compiler supporting C++14. The following C++ compilers are supported:
On Windows platforms, Visual C++ 2015 Update 2, or more recent
On Unix platforms, gcc 4.9 or a recent version of Clang
Licensing¶
We use a shared copyright model that enables all contributors to maintain the copyright on their contributions.
This software is licensed under the BSD-3-Clause license. See the LICENSE file for details.
INSTALLATION
USAGE
- Getting started
- Expressions and lazy evaluation
- Arrays and tensors
- Scalars and 0-D expressions
- Adapting 1-D containers
- Operators and functions
- Views
- Indices
- Expression builders
- Missing values
- Histogram
- Random
xt::random::seed()
xt::random::rand()
xt::random::randint()
xt::random::randn()
xt::random::binomial()
xt::random::geometric()
xt::random::negative_binomial()
xt::random::poisson()
xt::random::exponential()
xt::random::gamma()
xt::random::weibull()
xt::random::extreme_value()
xt::random::lognormal()
xt::random::cauchy()
xt::random::fisher_f()
xt::random::student_t()
xt::random::choice()
xt::random::shuffle()
xt::random::permutation()
- Tensor Rank
- File input and output
- Build and configuration
- Common pitfalls
QUICK REFERENCE
API REFERENCE
- Expressions and semantic
- Containers and views
- Iterators
- Functions and generators
- IO Operations
- Mathematical functions
- Operators and related functions
- Index related functions
- Basic functions
- Exponential functions
- Power functions
- Trigonometric functions
- Hyperbolic functions
- Error and gamma functions
- Nearest integer floating point operations
- Classification functions
- Reducing functions
- Accumulating functions
- NaN functions
- Shape/index manipulation
DEVELOPER ZONE
- Compiler workarounds
- Visual Studio 2015 and
std::enable_if
- GCC-4.9 and Clang < 3.8 and constexpr
std::min
andstd::max
- Clang < 3.8 not matching
initializer_list
with static arrays - Clang-cl and
std::get
- GCC < 5.1 and
std::is_trivially_default_constructible
- GCC-6 and the signature of
std::isnan
andstd::isinf
- GCC-8 and deleted functions
- Apple LLVM version >= 8.0.0
- Visual Studio 2015 and
- Build and configuration
- Internals of xtensor
- Extending xtensor
- Releasing xtensor
MISCELLANEOUS