xtensor
xtensor copied to clipboard
C++ tensors with broadcasting and lazy computing
This pull request fixes the support for shared pointer by xtensor_adaptor/xbuffer_adaptor. The default constructor was declared but not implemented. A default implementation is sufficient. Also the move operators are brought...
See https://github.com/xtensor-stack/xtensor/actions/runs/9744354935/job/26889803715
I'm trying to use [xtensor][1] for defining an image class with extra header information. The example [Structures that embed shape and strides][2] from the documentation page "Extending xtensor" comes very...
Hello! I found a strange action in the code ``` #include #include #include #include #include #include int main() { // good { auto a { xt::xarray::from_shape({2}) }; std::cout
xt::dump_csv() doesn't support 1D expressions. Is there any consideration in it? If not, dumping a 1D expression should be supported.
Kindly checkout the **Index Access** example from https://github.com/xtensor-stack/xtensor?tab=readme-ov-file#basic-usage . ``` #include #include "xtensor/xarray.hpp" #include "xtensor/xio.hpp" int main(){ xt::xarray arr1 {{1.0, 2.0, 3.0}, {2.0, 5.0, 7.0}, {2.0, 5.0, 7.0}}; std::cout
This project includes workarounds for the changes introduced in https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0522r0.html, which was adopted as a defect report and thus retroactively applies back to all language standards. See here: https://github.com/xtensor-stack/xtensor/blob/d9c3782ed51027b2d00be3c26288b2f74e4dbe94/include/xtensor/xutils.hpp#L1022 The...
Tested on 0.25.0, Clang 17. Repro code below. Code works when XTENSOR_ENABLE_ASSERT is not defined and doesn't compile when it is defined. ``` // #define XTENSOR_ENABLE_ASSERT #include #include #include using...
I wanted to support the numpy equivalent of boolean functions like `ndarray.all(axis=...)` / `ndarray.any(axis=...)` and went over the xtensor documentation. I came across `xt::all()` and `xt::any()`. I believe checking across...
# Checklist - [X] The title and commit message(s) are descriptive. - [X] Small commits made to fix your PR have been squashed to avoid history pollution. - [ ]...