From a2e84ab17b3b0f91287813488cb5ad4073da77e9 Mon Sep 17 00:00:00 2001 From: ThisIsFineTM <184989147+ThisIsFineTM@users.noreply.github.com> Date: Wed, 9 Apr 2025 17:05:44 -0400 Subject: [PATCH] Update docs to reflect new directory structure. --- docs/source/adaptor.rst | 26 +++---- docs/source/api/accumulating_functions.rst | 2 +- docs/source/api/basic_functions.rst | 2 +- docs/source/api/classif_functions.rst | 2 +- docs/source/api/error_functions.rst | 2 +- docs/source/api/exponential_functions.rst | 2 +- docs/source/api/hyperbolic_functions.rst | 2 +- docs/source/api/index_related.rst | 2 +- docs/source/api/nan_functions.rst | 2 +- docs/source/api/nearint_operations.rst | 2 +- docs/source/api/operators.rst | 2 +- docs/source/api/power_functions.rst | 2 +- docs/source/api/reducing_functions.rst | 4 +- docs/source/api/trigonometric_functions.rst | 2 +- docs/source/api/xaccumulator.rst | 2 +- docs/source/api/xadapt.rst | 2 +- docs/source/api/xarray.rst | 2 +- docs/source/api/xarray_adaptor.rst | 2 +- docs/source/api/xaxis_iterator.rst | 2 +- docs/source/api/xaxis_slice_iterator.rst | 2 +- docs/source/api/xbroadcast.rst | 2 +- docs/source/api/xbuilder.rst | 2 +- docs/source/api/xcontainer.rst | 6 +- docs/source/api/xcontainer_semantic.rst | 2 +- docs/source/api/xcsv.rst | 2 +- docs/source/api/xexpression.rst | 2 +- docs/source/api/xfixed.rst | 2 +- docs/source/api/xfunction.rst | 4 +- docs/source/api/xgenerator.rst | 2 +- docs/source/api/xhistogram.rst | 2 +- docs/source/api/xindex_view.rst | 2 +- docs/source/api/xio.rst | 6 +- docs/source/api/xiterable.rst | 2 +- docs/source/api/xjson.rst | 2 +- docs/source/api/xmanipulation.rst | 2 +- docs/source/api/xmasked_view.rst | 2 +- docs/source/api/xnpy.rst | 2 +- docs/source/api/xoptional_assembly.rst | 2 +- .../source/api/xoptional_assembly_adaptor.rst | 2 +- docs/source/api/xoptional_assembly_base.rst | 2 +- docs/source/api/xpad.rst | 2 +- docs/source/api/xrandom.rst | 2 +- docs/source/api/xreducer.rst | 2 +- docs/source/api/xrepeat.rst | 2 +- docs/source/api/xsemantic_base.rst | 2 +- docs/source/api/xset_operation.rst | 2 +- docs/source/api/xshape.rst | 2 +- docs/source/api/xsort.rst | 2 +- docs/source/api/xstrided_view.rst | 2 +- docs/source/api/xstrides.rst | 2 +- docs/source/api/xtensor.rst | 2 +- docs/source/api/xtensor_adaptor.rst | 2 +- docs/source/api/xview.rst | 4 +- docs/source/api/xview_semantic.rst | 2 +- docs/source/container.rst | 20 +++--- docs/source/developer/concepts.rst | 10 +-- docs/source/expression.rst | 8 +-- docs/source/external-structures.rst | 4 +- docs/source/file_loading.rst | 12 ++-- docs/source/getting_started.rst | 22 +++--- docs/source/histogram.rst | 12 ++-- docs/source/indices.rst | 26 +++---- docs/source/numpy-differences.rst | 4 +- docs/source/operator.rst | 54 +++++++------- docs/source/pitfall.rst | 2 +- docs/source/quickref/basic.rst | 16 ++--- docs/source/quickref/chunked_arrays.rst | 4 +- docs/source/quickref/iterator.rst | 42 +++++------ docs/source/quickref/manipulation.rst | 22 +++--- docs/source/related.rst | 18 ++--- docs/source/scalar.rst | 8 +-- docs/source/view.rst | 70 +++++++++---------- docs/source/xfft.rst | 2 +- 73 files changed, 251 insertions(+), 251 deletions(-) diff --git a/docs/source/adaptor.rst b/docs/source/adaptor.rst index c4bd153ac..64fd7caf3 100644 --- a/docs/source/adaptor.rst +++ b/docs/source/adaptor.rst @@ -20,8 +20,8 @@ The following example shows how to bring an ``std::vector`` into the expression #include #include - #include - #include + #include + #include std::vector v = {1., 2., 3., 4., 5., 6. }; std::vector shape = { 2, 3 }; @@ -50,7 +50,7 @@ ownership of the array: .. code:: #include - #include + #include void compute(double* data, std::size_t size) { @@ -82,8 +82,8 @@ the ownership of the array, meaning it will be deleted when the adaptor is destr .. code:: #include - #include - #include + #include + #include void compute(double*& data, std::size_t size) { @@ -119,8 +119,8 @@ adaptor before calling ``compute`` and pass it to the function: .. code:: #include - #include - #include + #include + #include template void compute(A& a) @@ -154,8 +154,8 @@ Adapting C arrays allocated on the stack is as simple as adapting ``std::vector` #include #include - #include - #include + #include + #include double v[6] = {1., 2., 3., 4., 5., 6. }; std::vector shape = { 2, 3 }; @@ -185,8 +185,8 @@ It will automatically increment the reference count of shared pointers upon crea .. code:: #include - #include - #include + #include + #include std::shared_ptr sptr(new double[8], std::default_delete()); sptr.get()[2] = 321.; @@ -201,8 +201,8 @@ memory) as follows: .. code:: #include - #include - #include + #include + #include struct Buffer { Buffer(std::vector& buf) : m_buf(buf) {} diff --git a/docs/source/api/accumulating_functions.rst b/docs/source/api/accumulating_functions.rst index 2bab12e94..edcc26909 100644 --- a/docs/source/api/accumulating_functions.rst +++ b/docs/source/api/accumulating_functions.rst @@ -9,7 +9,7 @@ Accumulating functions **xtensor** provides the following accumulating functions for xexpressions: -Defined in ``xtensor/xmath.hpp`` +Defined in ``xtensor/core/xmath.hpp`` .. doxygenfunction:: cumsum(E&&) diff --git a/docs/source/api/basic_functions.rst b/docs/source/api/basic_functions.rst index 4cdd11450..c96e34d66 100644 --- a/docs/source/api/basic_functions.rst +++ b/docs/source/api/basic_functions.rst @@ -9,7 +9,7 @@ Basic functions **xtensor** provides the following basic functions for xexpressions and scalars: -Defined in ``xtensor/xmath.hpp`` +Defined in ``xtensor/core/xmath.hpp`` .. doxygenfunction:: abs(E&&) diff --git a/docs/source/api/classif_functions.rst b/docs/source/api/classif_functions.rst index aa7b8cc51..d170f737b 100644 --- a/docs/source/api/classif_functions.rst +++ b/docs/source/api/classif_functions.rst @@ -9,7 +9,7 @@ Classification functions **xtensor** provides the following classification functions for xexpressions and scalars: -Defined in ``xtensor/xmath.hpp`` +Defined in ``xtensor/core/xmath.hpp`` .. doxygenfunction:: isfinite(E&&) diff --git a/docs/source/api/error_functions.rst b/docs/source/api/error_functions.rst index aee5af61b..7b335e4cc 100644 --- a/docs/source/api/error_functions.rst +++ b/docs/source/api/error_functions.rst @@ -9,7 +9,7 @@ Error and gamma functions **xtensor** provides the following error and gamma functions for xexpressions: -Defined in ``xtensor/xmath.hpp`` +Defined in ``xtensor/core/xmath.hpp`` .. doxygenfunction:: erf(E&&) diff --git a/docs/source/api/exponential_functions.rst b/docs/source/api/exponential_functions.rst index 4c2147a5a..e2202dd67 100644 --- a/docs/source/api/exponential_functions.rst +++ b/docs/source/api/exponential_functions.rst @@ -9,7 +9,7 @@ Exponential functions **xtensor** provides the following exponential functions for xexpressions: -Defined in ``xtensor/xmath.hpp`` +Defined in ``xtensor/core/xmath.hpp`` .. doxygenfunction:: exp(E&&) diff --git a/docs/source/api/hyperbolic_functions.rst b/docs/source/api/hyperbolic_functions.rst index f6b71958f..e7e835104 100644 --- a/docs/source/api/hyperbolic_functions.rst +++ b/docs/source/api/hyperbolic_functions.rst @@ -9,7 +9,7 @@ Hyperbolic functions **xtensor** provides the following hyperbolic functions for xexpressions: -Defined in ``xtensor/xmath.hpp`` +Defined in ``xtensor/core/xmath.hpp`` .. _sinh-function-reference: .. doxygenfunction:: sinh(E&&) diff --git a/docs/source/api/index_related.rst b/docs/source/api/index_related.rst index c3f5b1ed7..7f74c758e 100644 --- a/docs/source/api/index_related.rst +++ b/docs/source/api/index_related.rst @@ -7,7 +7,7 @@ Index related functions ======================= -Defined in ``xtensor/xoperation.hpp`` +Defined in ``xtensor/core/xoperation.hpp`` .. doxygenfunction:: where(const T&) diff --git a/docs/source/api/nan_functions.rst b/docs/source/api/nan_functions.rst index 27f91d515..5b35e5c0f 100644 --- a/docs/source/api/nan_functions.rst +++ b/docs/source/api/nan_functions.rst @@ -9,7 +9,7 @@ NaN functions **xtensor** provides the following functions that deal with NaNs in xexpressions: -Defined in ``xtensor/xmath.hpp`` +Defined in ``xtensor/core/xmath.hpp`` .. doxygenfunction:: nan_to_num(E&&) diff --git a/docs/source/api/nearint_operations.rst b/docs/source/api/nearint_operations.rst index e083f8247..c4ba6832c 100644 --- a/docs/source/api/nearint_operations.rst +++ b/docs/source/api/nearint_operations.rst @@ -9,7 +9,7 @@ Nearest integer floating point operations **xtensor** provides the following rounding operations for xexpressions: -Defined in ``xtensor/xmath.hpp`` +Defined in ``xtensor/core/xmath.hpp`` .. doxygenfunction:: ceil(E&&) diff --git a/docs/source/api/operators.rst b/docs/source/api/operators.rst index 09128ceea..32a474221 100644 --- a/docs/source/api/operators.rst +++ b/docs/source/api/operators.rst @@ -7,7 +7,7 @@ Operators and related functions =============================== -Defined in ``xtensor/xmath.hpp`` and ``xtensor/xoperation.hpp`` +Defined in ``xtensor/core/xmath.hpp`` and ``xtensor/core/xoperation.hpp`` .. doxygenfunction:: operator+(E&&) diff --git a/docs/source/api/power_functions.rst b/docs/source/api/power_functions.rst index 5585bca5d..a11b5ba27 100644 --- a/docs/source/api/power_functions.rst +++ b/docs/source/api/power_functions.rst @@ -10,7 +10,7 @@ Power functions **xtensor** provides the following power functions for xexpressions and scalars: -Defined in ``xtensor/xmath.hpp`` +Defined in ``xtensor/core/xmath.hpp`` .. doxygenfunction:: pow(E1&&, E2&&) diff --git a/docs/source/api/reducing_functions.rst b/docs/source/api/reducing_functions.rst index a8be2de61..223e57a92 100644 --- a/docs/source/api/reducing_functions.rst +++ b/docs/source/api/reducing_functions.rst @@ -9,7 +9,7 @@ Reducing functions **xtensor** provides the following reducing functions for xexpressions: -Defined in ``xtensor/xmath.hpp`` +Defined in ``xtensor/core/xmath.hpp`` .. doxygenfunction:: sum(E&&, EVS) @@ -49,7 +49,7 @@ Defined in ``xtensor/xmath.hpp`` .. doxygenfunction:: trapz(const xexpression&, const xexpression&, std::ptrdiff_t) -Defined in ``xtensor/xnorm.hpp`` +Defined in ``xtensor/reducers/xnorm.hpp`` .. doxygenfunction:: norm_l0(E&&, X&&, EVS) diff --git a/docs/source/api/trigonometric_functions.rst b/docs/source/api/trigonometric_functions.rst index 243bf57c5..6234470d0 100644 --- a/docs/source/api/trigonometric_functions.rst +++ b/docs/source/api/trigonometric_functions.rst @@ -9,7 +9,7 @@ Trigonometric functions **xtensor** provides the following trigonometric functions for xexpressions and scalars: -Defined in ``xtensor/xmath.hpp`` +Defined in ``xtensor/core/xmath.hpp`` .. doxygenfunction:: sin(E&&) diff --git a/docs/source/api/xaccumulator.rst b/docs/source/api/xaccumulator.rst index 07217167d..906f5288e 100644 --- a/docs/source/api/xaccumulator.rst +++ b/docs/source/api/xaccumulator.rst @@ -7,7 +7,7 @@ xaccumulator ============ -Defined in ``xtensor/xaccumulator.hpp`` +Defined in ``xtensor/reducers/xaccumulator.hpp`` .. doxygenfunction:: xt::accumulate(F&&, E&&, EVS) diff --git a/docs/source/api/xadapt.rst b/docs/source/api/xadapt.rst index 761b7f5ba..86f9e4eb2 100644 --- a/docs/source/api/xadapt.rst +++ b/docs/source/api/xadapt.rst @@ -7,7 +7,7 @@ xadapt ====== -Defined in ``xtensor/xadapt.hpp`` +Defined in ``xtensor/containers/xadapt.hpp`` .. cpp:namespace-push:: xt diff --git a/docs/source/api/xarray.rst b/docs/source/api/xarray.rst index 5a081056b..18e06692e 100644 --- a/docs/source/api/xarray.rst +++ b/docs/source/api/xarray.rst @@ -7,7 +7,7 @@ xarray ====== -Defined in ``xtensor/xarray.hpp`` +Defined in ``xtensor/containers/xarray.hpp`` .. doxygenclass:: xt::xarray_container :members: diff --git a/docs/source/api/xarray_adaptor.rst b/docs/source/api/xarray_adaptor.rst index 9c40c9334..d1110c7ba 100644 --- a/docs/source/api/xarray_adaptor.rst +++ b/docs/source/api/xarray_adaptor.rst @@ -7,7 +7,7 @@ xarray_adaptor ============== -Defined in ``xtensor/xarray.hpp`` +Defined in ``xtensor/containers/xarray.hpp`` .. doxygenclass:: xt::xarray_adaptor :members: diff --git a/docs/source/api/xaxis_iterator.rst b/docs/source/api/xaxis_iterator.rst index c2fdf0372..e43bae3ee 100644 --- a/docs/source/api/xaxis_iterator.rst +++ b/docs/source/api/xaxis_iterator.rst @@ -7,7 +7,7 @@ xaxis_iterator ============== -Defined in ``xtensor/xaxis_iterator.hpp`` +Defined in ``xtensor/views/xaxis_iterator.hpp`` .. doxygenclass:: xt::xaxis_iterator :members: diff --git a/docs/source/api/xaxis_slice_iterator.rst b/docs/source/api/xaxis_slice_iterator.rst index 0e49ac075..4882fc292 100644 --- a/docs/source/api/xaxis_slice_iterator.rst +++ b/docs/source/api/xaxis_slice_iterator.rst @@ -8,7 +8,7 @@ xaxis_slice_iterator ==================== -Defined in ``xtensor/xaxis_slice_iterator.hpp`` +Defined in ``xtensor/views/xaxis_slice_iterator.hpp`` .. doxygenclass:: xt::xaxis_slice_iterator :members: diff --git a/docs/source/api/xbroadcast.rst b/docs/source/api/xbroadcast.rst index 901f429fd..e5fe1790f 100644 --- a/docs/source/api/xbroadcast.rst +++ b/docs/source/api/xbroadcast.rst @@ -7,7 +7,7 @@ xbroadcast ========== -Defined in ``xtensor/xbroadcast.hpp`` +Defined in ``xtensor/views/xbroadcast.hpp`` .. doxygenclass:: xt::xbroadcast :members: diff --git a/docs/source/api/xbuilder.rst b/docs/source/api/xbuilder.rst index 41f7b3194..db358f88e 100644 --- a/docs/source/api/xbuilder.rst +++ b/docs/source/api/xbuilder.rst @@ -7,7 +7,7 @@ xbuilder ======== -Defined in ``xtensor/xbuilder.hpp`` +Defined in ``xtensor/generators/xbuilder.hpp`` .. doxygenfunction:: xt::ones(S) diff --git a/docs/source/api/xcontainer.rst b/docs/source/api/xcontainer.rst index 5a94dd896..24fbf6c47 100644 --- a/docs/source/api/xcontainer.rst +++ b/docs/source/api/xcontainer.rst @@ -7,7 +7,7 @@ layout ====== -Defined in ``xtensor/xlayout.hpp`` +Defined in ``xtensor/core/xlayout.hpp`` .. doxygenenum:: xt::layout_type @@ -16,7 +16,7 @@ Defined in ``xtensor/xlayout.hpp`` xcontainer ========== -Defined in ``xtensor/xcontainer.hpp`` +Defined in ``xtensor/containers/xcontainer.hpp`` .. doxygenclass:: xt::xcontainer :members: @@ -24,7 +24,7 @@ Defined in ``xtensor/xcontainer.hpp`` xstrided_container ================== -Defined in ``xtensor/xcontainer.hpp`` +Defined in ``xtensor/containers/xcontainer.hpp`` .. doxygenclass:: xt::xstrided_container :members: diff --git a/docs/source/api/xcontainer_semantic.rst b/docs/source/api/xcontainer_semantic.rst index 1162af6c4..c69866083 100644 --- a/docs/source/api/xcontainer_semantic.rst +++ b/docs/source/api/xcontainer_semantic.rst @@ -7,7 +7,7 @@ xcontainer_semantic =================== -Defined in ``xtensor/xsemantic.hpp`` +Defined in ``xtensor/core/xsemantic.hpp`` .. doxygenclass:: xt::xcontainer_semantic :members: diff --git a/docs/source/api/xcsv.rst b/docs/source/api/xcsv.rst index 2e187e92a..bc762b00f 100644 --- a/docs/source/api/xcsv.rst +++ b/docs/source/api/xcsv.rst @@ -7,7 +7,7 @@ xcsv: read/write CSV files ========================== -Defined in ``xtensor/xcsv.hpp`` +Defined in ``xtensor/io/xcsv.hpp`` .. doxygenfunction:: xt::load_csv diff --git a/docs/source/api/xexpression.rst b/docs/source/api/xexpression.rst index 800d44875..61f117592 100644 --- a/docs/source/api/xexpression.rst +++ b/docs/source/api/xexpression.rst @@ -7,7 +7,7 @@ xexpression =========== -Defined in ``xtensor/xexpression.hpp`` +Defined in ``xtensor/core/xexpression.hpp`` .. doxygenclass:: xt::xexpression :members: diff --git a/docs/source/api/xfixed.rst b/docs/source/api/xfixed.rst index f00dabb6d..b9afc6d7b 100644 --- a/docs/source/api/xfixed.rst +++ b/docs/source/api/xfixed.rst @@ -7,7 +7,7 @@ xtensor_fixed ============= -Defined in ``xtensor/xfixed.hpp`` +Defined in ``xtensor/containers/xfixed.hpp`` .. doxygenclass:: xt::xfixed_container :members: diff --git a/docs/source/api/xfunction.rst b/docs/source/api/xfunction.rst index 9dd42a79b..e572e463b 100644 --- a/docs/source/api/xfunction.rst +++ b/docs/source/api/xfunction.rst @@ -7,11 +7,11 @@ xfunction ========= -Defined in ``xtensor/xfunction.hpp`` +Defined in ``xtensor/core/xfunction.hpp`` .. doxygenclass:: xt::xfunction :members: -Defined in ``xtensor/xmath.hpp`` +Defined in ``xtensor/core/xmath.hpp`` .. doxygenfunction:: make_lambda_xfunction diff --git a/docs/source/api/xgenerator.rst b/docs/source/api/xgenerator.rst index f5d09ef65..8d96da7f3 100644 --- a/docs/source/api/xgenerator.rst +++ b/docs/source/api/xgenerator.rst @@ -7,7 +7,7 @@ xgenerator ========== -Defined in ``xtensor/xgenerator.hpp`` +Defined in ``xtensor/generators/xgenerator.hpp`` .. doxygenclass:: xt::xgenerator :members: diff --git a/docs/source/api/xhistogram.rst b/docs/source/api/xhistogram.rst index 073d75ef6..71b05c89b 100644 --- a/docs/source/api/xhistogram.rst +++ b/docs/source/api/xhistogram.rst @@ -7,7 +7,7 @@ xhistogram ========== -Defined in ``xtensor/xhistogram.hpp`` +Defined in ``xtensor/misc/xhistogram.hpp`` .. doxygenenum:: xt::histogram_algorithm diff --git a/docs/source/api/xindex_view.rst b/docs/source/api/xindex_view.rst index 8fa1619e0..d47ab3733 100644 --- a/docs/source/api/xindex_view.rst +++ b/docs/source/api/xindex_view.rst @@ -7,7 +7,7 @@ xindex_view =========== -Defined in ``xtensor/xindex_view.hpp`` +Defined in ``xtensor/views/xindex_view.hpp`` .. doxygenclass:: xt::xindex_view :members: diff --git a/docs/source/api/xio.rst b/docs/source/api/xio.rst index 3b2a0587d..7af4c5d09 100644 --- a/docs/source/api/xio.rst +++ b/docs/source/api/xio.rst @@ -7,15 +7,15 @@ xio: pretty printing ==================== -Defined in ``xtensor/xio.hpp`` +Defined in ``xtensor/io/xio.hpp`` This file defines functions for pretty printing xexpressions. It defines appropriate overloads for the ``<<`` operator for std::ostreams and xexpressions. .. code:: - #include - #include + #include + #include int main() { diff --git a/docs/source/api/xiterable.rst b/docs/source/api/xiterable.rst index 2e7d1a98b..f0ad5637d 100644 --- a/docs/source/api/xiterable.rst +++ b/docs/source/api/xiterable.rst @@ -7,7 +7,7 @@ xiterable ========= -Defined in ``xtensor/xiterable.hpp`` +Defined in ``xtensor/core/xiterable.hpp`` .. doxygenclass:: xt::xconst_iterable :members: diff --git a/docs/source/api/xjson.rst b/docs/source/api/xjson.rst index 735846278..7a11957a5 100644 --- a/docs/source/api/xjson.rst +++ b/docs/source/api/xjson.rst @@ -7,7 +7,7 @@ xjson: serialize to/from JSON ============================= -Defined in ``xtensor/xjson.hpp`` +Defined in ``xtensor/io/xjson.hpp`` .. doxygenfunction:: xt::to_json(nlohmann::json&, const E&); diff --git a/docs/source/api/xmanipulation.rst b/docs/source/api/xmanipulation.rst index 784dbe742..779010da5 100644 --- a/docs/source/api/xmanipulation.rst +++ b/docs/source/api/xmanipulation.rst @@ -7,7 +7,7 @@ xmanipulation ============= -Defined in ``xtensor/xmanipulation.hpp`` +Defined in ``xtensor/misc/xmanipulation.hpp`` .. cpp:namespace-push:: xt diff --git a/docs/source/api/xmasked_view.rst b/docs/source/api/xmasked_view.rst index 63ab0241b..b7df88ec3 100644 --- a/docs/source/api/xmasked_view.rst +++ b/docs/source/api/xmasked_view.rst @@ -7,7 +7,7 @@ xmasked_view ============ -Defined in ``xtensor/xmasked_view.hpp`` +Defined in ``xtensor/views/xmasked_view.hpp`` .. doxygenclass:: xt::xmasked_view :members: diff --git a/docs/source/api/xnpy.rst b/docs/source/api/xnpy.rst index f7f861db3..0c1f3320a 100644 --- a/docs/source/api/xnpy.rst +++ b/docs/source/api/xnpy.rst @@ -7,7 +7,7 @@ xnpy: read/write NPY files ========================== -Defined in ``xtensor/xnpy.hpp`` +Defined in ``xtensor/io/xnpy.hpp`` .. doxygenfunction:: xt::load_npy(std::istream&) diff --git a/docs/source/api/xoptional_assembly.rst b/docs/source/api/xoptional_assembly.rst index 8e35426ad..e40d6bd9a 100644 --- a/docs/source/api/xoptional_assembly.rst +++ b/docs/source/api/xoptional_assembly.rst @@ -7,7 +7,7 @@ xoptional_assembly ================== -Defined in ``xtensor/xoptional_assembly.hpp`` +Defined in ``xtensor/optional/xoptional_assembly.hpp`` .. doxygenclass:: xt::xoptional_assembly :members: diff --git a/docs/source/api/xoptional_assembly_adaptor.rst b/docs/source/api/xoptional_assembly_adaptor.rst index 72b44fa29..f58c06690 100644 --- a/docs/source/api/xoptional_assembly_adaptor.rst +++ b/docs/source/api/xoptional_assembly_adaptor.rst @@ -7,7 +7,7 @@ xoptional_assembly_adaptor ========================== -Defined in ``xtensor/xoptional_assembly.hpp`` +Defined in ``xtensor/optional/xoptional_assembly.hpp`` .. doxygenclass:: xt::xoptional_assembly_adaptor :members: diff --git a/docs/source/api/xoptional_assembly_base.rst b/docs/source/api/xoptional_assembly_base.rst index d65fb1f92..37fa07427 100644 --- a/docs/source/api/xoptional_assembly_base.rst +++ b/docs/source/api/xoptional_assembly_base.rst @@ -7,7 +7,7 @@ xoptional_assembly_base ======================= -Defined in ``xtensor/xoptional_assembly_base.hpp`` +Defined in ``xtensor/optional/xoptional_assembly_base.hpp`` .. doxygenclass:: xt::xoptional_assembly_base :members: diff --git a/docs/source/api/xpad.rst b/docs/source/api/xpad.rst index b4c8a169a..971a14d04 100644 --- a/docs/source/api/xpad.rst +++ b/docs/source/api/xpad.rst @@ -7,7 +7,7 @@ xpad ==== -Defined in ``xtensor/xpad.hpp`` +Defined in ``xtensor/misc/xpad.hpp`` .. doxygenenum:: xt::pad_mode diff --git a/docs/source/api/xrandom.rst b/docs/source/api/xrandom.rst index 07cd1d321..c2040e48c 100644 --- a/docs/source/api/xrandom.rst +++ b/docs/source/api/xrandom.rst @@ -7,7 +7,7 @@ xrandom ======= -Defined in ``xtensor/xrandom.hpp`` +Defined in ``xtensor/generators/xrandom.hpp`` .. warning:: xtensor uses a lazy generator for random numbers. You need to assign them or use ``eval`` to keep the generated values consistent. diff --git a/docs/source/api/xreducer.rst b/docs/source/api/xreducer.rst index 4b5570b93..85ee2a09a 100644 --- a/docs/source/api/xreducer.rst +++ b/docs/source/api/xreducer.rst @@ -7,7 +7,7 @@ xreducer ======== -Defined in ``xtensor/xreducer.hpp`` +Defined in ``xtensor/reducers/xreducer.hpp`` .. doxygenclass:: xt::xreducer :members: diff --git a/docs/source/api/xrepeat.rst b/docs/source/api/xrepeat.rst index 17fd209b7..5e3db7c82 100644 --- a/docs/source/api/xrepeat.rst +++ b/docs/source/api/xrepeat.rst @@ -7,7 +7,7 @@ xrepeat ======= -Defined in ``xtensor/xrepeat.hpp`` +Defined in ``xtensor/views/xrepeat.hpp`` .. doxygenclass:: xt::xrepeat :members: diff --git a/docs/source/api/xsemantic_base.rst b/docs/source/api/xsemantic_base.rst index 9ce72c7b7..c6062cf91 100644 --- a/docs/source/api/xsemantic_base.rst +++ b/docs/source/api/xsemantic_base.rst @@ -7,7 +7,7 @@ xsemantic_base ============== -Defined in ``xtensor/xsemantic.hpp`` +Defined in ``xtensor/core/xsemantic.hpp`` .. doxygenclass:: xt::xsemantic_base :members: diff --git a/docs/source/api/xset_operation.rst b/docs/source/api/xset_operation.rst index 4ce798e38..31b25126c 100644 --- a/docs/source/api/xset_operation.rst +++ b/docs/source/api/xset_operation.rst @@ -7,7 +7,7 @@ xset_operation ============== -Defined in ``xtensor/xset_operation.hpp`` +Defined in ``xtensor/misc/xset_operation.hpp`` .. doxygenenum:: xt::isin(E&&, F&&) diff --git a/docs/source/api/xshape.rst b/docs/source/api/xshape.rst index 370d778ee..72f28b2ea 100644 --- a/docs/source/api/xshape.rst +++ b/docs/source/api/xshape.rst @@ -7,7 +7,7 @@ xshape ====== -Defined in ``xtensor/xshape.hpp`` +Defined in ``xtensor/core/xshape.hpp`` .. cpp:namespace-push:: xt diff --git a/docs/source/api/xsort.rst b/docs/source/api/xsort.rst index d6240d375..082532d52 100644 --- a/docs/source/api/xsort.rst +++ b/docs/source/api/xsort.rst @@ -7,7 +7,7 @@ xsort ===== -Defined in ``xtensor/xsort.hpp`` +Defined in ``xtensor/misc/xsort.hpp`` .. cpp:namespace-push:: xt diff --git a/docs/source/api/xstrided_view.rst b/docs/source/api/xstrided_view.rst index 4d308e2ff..351b09da9 100644 --- a/docs/source/api/xstrided_view.rst +++ b/docs/source/api/xstrided_view.rst @@ -7,7 +7,7 @@ xstrided_view ============= -Defined in ``xtensor/xstrided_view.hpp`` +Defined in ``xtensor/views/xstrided_view.hpp`` .. doxygenclass:: xt::xstrided_view :members: diff --git a/docs/source/api/xstrides.rst b/docs/source/api/xstrides.rst index e3143e8ca..a09540557 100644 --- a/docs/source/api/xstrides.rst +++ b/docs/source/api/xstrides.rst @@ -7,7 +7,7 @@ xstrides ======== -Defined in ``xtensor/xstrides.hpp`` +Defined in ``xtensor/core/xstrides.hpp`` .. cpp:namespace-push:: xt diff --git a/docs/source/api/xtensor.rst b/docs/source/api/xtensor.rst index 7fa987462..f896da812 100644 --- a/docs/source/api/xtensor.rst +++ b/docs/source/api/xtensor.rst @@ -7,7 +7,7 @@ xtensor ======= -Defined in ``xtensor/xtensor.hpp`` +Defined in ``xtensor/containers/xtensor.hpp`` .. doxygenclass:: xt::xtensor_container :members: diff --git a/docs/source/api/xtensor_adaptor.rst b/docs/source/api/xtensor_adaptor.rst index bc10282a7..84e21f23e 100644 --- a/docs/source/api/xtensor_adaptor.rst +++ b/docs/source/api/xtensor_adaptor.rst @@ -7,7 +7,7 @@ xtensor_adaptor =============== -Defined in ``xtensor/xtensor.hpp`` +Defined in ``xtensor/containers/xtensor.hpp`` .. doxygenclass:: xt::xtensor_adaptor :members: diff --git a/docs/source/api/xview.rst b/docs/source/api/xview.rst index 37bf7f86b..9652ea26a 100644 --- a/docs/source/api/xview.rst +++ b/docs/source/api/xview.rst @@ -7,7 +7,7 @@ xview ===== -Defined in ``xtensor/xview.hpp`` +Defined in ``xtensor/views/xview.hpp`` .. doxygenclass:: xt::xview :members: @@ -18,7 +18,7 @@ Defined in ``xtensor/xview.hpp`` .. doxygenfunction:: xt::col -Defined in ``xtensor/xslice.hpp`` +Defined in ``xtensor/views/xslice.hpp`` .. doxygenfunction:: xt::range(A, B) diff --git a/docs/source/api/xview_semantic.rst b/docs/source/api/xview_semantic.rst index c8f5a39bd..211b27223 100644 --- a/docs/source/api/xview_semantic.rst +++ b/docs/source/api/xview_semantic.rst @@ -7,7 +7,7 @@ xview_semantic ============== -Defined in ``xtensor/xsemantic.hpp`` +Defined in ``xtensor/core/xsemantic.hpp`` .. doxygenclass:: xt::xview_semantic :members: diff --git a/docs/source/container.rst b/docs/source/container.rst index f2f644353..74367b7a8 100644 --- a/docs/source/container.rst +++ b/docs/source/container.rst @@ -41,7 +41,7 @@ The following example shows how to initialize a multi-dimensional array of dynam .. code:: #include - #include + #include std::vector shape = { 3, 2, 4 }; std::vector strides = { 8, 4, 1 }; @@ -53,7 +53,7 @@ We can use the following shortcut to specify the strides instead of computing th .. code:: #include - #include + #include std::vector shape = { 3, 2, 4 }; xt::xarray a(shape, xt::layout_type::row_major); @@ -63,7 +63,7 @@ If the layout of the array can be fixed at compile time, we can make it even sim .. code:: #include - #include + #include std::vector shape = { 3, 2, 4 }; xt::xarray a(shape); @@ -91,7 +91,7 @@ Let's use :cpp:type:`xt::xtensor` instead of :cpp:type:`xt::xarray` in the previ .. code:: #include - #include + #include std::array shape = { 3, 2, 4 }; xt::xtensor a(shape); @@ -102,7 +102,7 @@ Or when using :cpp:type:`xt::xtensor_fixed`: .. code:: - #include + #include xt::xtensor_fixed> a(); // or xt::xtensor_fixed, xt::layout_type::row_major>() @@ -128,7 +128,7 @@ remain the same: .. code:: - #include + #include xt::xarray a = { 1, 2, 3, 4, 5, 6, 7, 8}; // The following two lines ... @@ -145,7 +145,7 @@ In this case, the value is inferred from the number of elements in the container .. code:: - #include + #include xt::xarray a = { 1, 2, 3, 4, 5, 6, 7, 8}; a.reshape({2, -1}); // a.shape() return {2, 4} @@ -183,8 +183,8 @@ A mechanism is provided to forcibly prevent usage of a temporary variable: .. code:: - #include - #include + #include + #include // a, b, and c are xt::xarrays previously initialized xt::noalias(b) = a + c; @@ -199,7 +199,7 @@ The aliasing phenomenon is illustrated in the following example: .. code:: #include - #include + #include std::vector a_shape = {3, 2, 4}; xt::xarray a(a_shape); diff --git a/docs/source/developer/concepts.rst b/docs/source/developer/concepts.rst index fa8809599..06de0ffd2 100644 --- a/docs/source/developer/concepts.rst +++ b/docs/source/developer/concepts.rst @@ -26,7 +26,7 @@ class whose template parameter is ``A`` and should forward this parameter to :cp .. code:: - #include + #include template class B : public xexpression @@ -55,7 +55,7 @@ xiterable ~~~~~~~~~ The iterable concept is modeled by two classes, ``xconst_iterable`` and ``xiterable``, defined -in ``xtensor/xiterable.hpp``. ``xconst_iterable`` provides types and methods for iterating on +in ``xtensor/core/xiterable.hpp``. ``xconst_iterable`` provides types and methods for iterating on constant expressions, similar to the ones provided by the STL containers. Unlike the STL, the methods of ``xconst_iterable`` and ``xiterable`` are templated by a layout parameter that allows you to iterate over a N-dimensional expression in row-major order or column-major order. @@ -111,7 +111,7 @@ given shape: #include #include #include - #include + #include int main(int argc, char* argv[]) { @@ -146,8 +146,8 @@ The first overload is meant for computed assignment involving a scalar; it allow .. code:: - #include - #include + #include + #include int main(int argc, char* argv) { diff --git a/docs/source/expression.rst b/docs/source/expression.rst index 6bbaf9b2e..0fec517f7 100644 --- a/docs/source/expression.rst +++ b/docs/source/expression.rst @@ -128,7 +128,7 @@ You can access the elements of any :cpp:type:`xt::xexpression` with :cpp:func:`~ .. code:: - #include + #include xt::xarray a = {{1., 2., 3.}, {4., 5., 6.}}; auto f = 2 * a; @@ -145,7 +145,7 @@ of the expression: .. code:: - #include + #include xt::xarray a = {{1., 2., 3.}, {4., 5., 6.}}; @@ -169,7 +169,7 @@ Shape .. code:: #include - #include + #include using array_type = xt::xarray; using shape_type = array_type::shape_type; @@ -199,7 +199,7 @@ Element access .. code:: #include - #inclde "xtensor/xarray.hpp" + #inclde "xtensor/containers/xarray.hpp" // xt::xarray a = ... std::vector index = {1, 1, 1}; diff --git a/docs/source/external-structures.rst b/docs/source/external-structures.rst index b85fcd02f..1eb048138 100644 --- a/docs/source/external-structures.rst +++ b/docs/source/external-structures.rst @@ -207,7 +207,7 @@ strides based on the shape and the layout, so the implementation of the ``resize .. code:: - #include // for utility functions + #include // for utility functions template void resize(const shape_type& shape) @@ -464,7 +464,7 @@ This part is relatively straightforward: template bool broadcast_shape(const S& s) const { - // Available in "xtensor/xtrides.hpp" + // Available in "xtensor/core/xstrides.hpp" return xt::broadcast_shape(shape(), s); } diff --git a/docs/source/file_loading.rst b/docs/source/file_loading.rst index 917eaa9b3..348b12e40 100644 --- a/docs/source/file_loading.rst +++ b/docs/source/file_loading.rst @@ -28,8 +28,8 @@ save data in the Comma-separated value format. The reference documentation is :d #include #include - #include - #include + #include + #include int main() { @@ -59,8 +59,8 @@ Reference documentation for the functions used is found here :doc:`api/xnpy`. #include #include - #include - #include + #include + #include int main() { @@ -85,8 +85,8 @@ The reference documentation is found :doc:`api/xjson`. .. code:: - #include - #include + #include + #include int main() { diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index f37007528..45f315f8a 100644 --- a/docs/source/getting_started.rst +++ b/docs/source/getting_started.rst @@ -16,9 +16,9 @@ First example .. code:: #include - #include - #include - #include + #include + #include + #include int main(int argc, char* argv[]) { @@ -142,8 +142,8 @@ This second example initializes a 1-dimensional array and reshapes it in-place: .. code:: #include - #include - #include + #include + #include int main(int argc, char* argv[]) { @@ -177,7 +177,7 @@ When compiled and run, this produces the following output: .. code-block:: cpp - std::cout << xt::adapt(arr.shape()); // with: #include + std::cout << xt::adapt(arr.shape()); // with: #include Third example: index access --------------------------- @@ -185,8 +185,8 @@ Third example: index access .. code:: #include - #include - #include + #include + #include int main(int argc, char* argv[]) { @@ -219,9 +219,9 @@ This last example shows how to broadcast the :cpp:func:`xt::pow` universal funct .. code:: #include - #include - #include - #include + #include + #include + #include int main(int argc, char* argv[]) { diff --git a/docs/source/histogram.rst b/docs/source/histogram.rst index f7796ce04..f1e37c94c 100644 --- a/docs/source/histogram.rst +++ b/docs/source/histogram.rst @@ -30,9 +30,9 @@ with that difference that the bin-edges are obtained by a separate function call .. code-block:: cpp - #include - #include - #include + #include + #include + #include int main() { @@ -53,9 +53,9 @@ To customize the algorithm to be used to construct the histogram, one needs to m .. code-block:: cpp - #include - #include - #include + #include + #include + #include int main() { diff --git a/docs/source/indices.rst b/docs/source/indices.rst index cf51597f6..e32fce8c7 100644 --- a/docs/source/indices.rst +++ b/docs/source/indices.rst @@ -14,9 +14,9 @@ There are two types of indices: *array indices* and *flat indices*. Consider thi .. code-block:: cpp - #include - #include - #include + #include + #include + #include int main() { @@ -183,9 +183,9 @@ For the same example: .. code-block:: cpp - #include - #include - #include + #include + #include + #include int main() { @@ -222,9 +222,9 @@ For example: .. code-block:: cpp - #include - #include - #include + #include + #include + #include int main() { @@ -252,10 +252,10 @@ For example .. code-block:: cpp - #include - #include - #include - #include + #include + #include + #include + #include int main() { diff --git a/docs/source/numpy-differences.rst b/docs/source/numpy-differences.rst index fe162b6ae..03968685e 100644 --- a/docs/source/numpy-differences.rst +++ b/docs/source/numpy-differences.rst @@ -32,8 +32,8 @@ array argument is a 0-D argument: .. code:: - #include - #include + #include + #include xt::xarray x = 1; std::cout << xt::cumsum(x, 0) << std::endl; diff --git a/docs/source/operator.rst b/docs/source/operator.rst index bca7c1595..7323ed5a3 100644 --- a/docs/source/operator.rst +++ b/docs/source/operator.rst @@ -26,7 +26,7 @@ rules explained in a previous section. .. code:: - #incude "xtensor/xarray.hpp" + #incude "xtensor/containers/xarray.hpp" xt::xarray a = {{1, 2}, {3, 4}}; xt::xarray b = {1, 2}; @@ -58,7 +58,7 @@ and an element-wise ternary function (similar to the ``: ?`` ternary operator): .. code:: - #include + #include xt::xarray b = { false, true, true, false }; xt::xarray a1 = { 1, 2, 3, 4 }; @@ -86,7 +86,7 @@ C++ inequality operators: they are element-wise operators returning boolean .. code:: - #include + #include xt::xarray a1 = { 1, 12, 3, 14 }; xt::xarray a2 = { 11, 2, 13, 4 }; @@ -105,7 +105,7 @@ function. .. code:: - #include + #include xt::xarray a1 = { 1, 2, 3, 4}; xt::xarray a2 = { 11, 12, 3, 4}; @@ -153,7 +153,7 @@ performed via :cpp:func:`xt::cast`, which performs an element-wise ``static_cast .. code:: - #include + #include xt::xarray a = { 3, 5, 7 }; @@ -173,8 +173,8 @@ axes removed. .. code:: - #include - #include + #include + #include xt::xarray a = xt::ones({3, 2, 4, 6, 5}); xt::xarray res = xt::sum(a, {1, 3}); @@ -185,8 +185,8 @@ You can also call the :cpp:func:`xt::reduce` generator with your own reducing fu .. code:: - #include - #include + #include + #include xt::xarray arr = some_init_function({3, 2, 4, 6, 5}); xt::xarray res = xt::reduce([](double a, double b) { return a*a + b*b; }, @@ -199,8 +199,8 @@ A generator is provided to build the :cpp:type:`xt::xreducer_functors` object, t .. code:: - #include - #include + #include + #include xt::xarray arr = some_init_function({3, 2, 4, 6, 5}); xt::xarray res = xt::reduce(xt::make_xreducer_functor([](double a, double b) { return a*a + b*b; }, @@ -214,8 +214,8 @@ the evaluation and get the result: .. code:: - #include - #include + #include + #include xt::xarray arr = some_init_function({3, 2, 4, 6, 5}); double res = xt::reduce([](double a, double b) { return a*a + b*b; }, arr)(); @@ -232,8 +232,8 @@ computation: .. code:: - #include - #include + #include + #include xt::xarray arr = some_init_function({3, 2, 4, 6, 5}); auto s1 = xt::sum(arr); // No effect, short + int = int @@ -244,8 +244,8 @@ as shown below: .. code:: - #include - #include + #include + #include template void my_computation(E&& e) @@ -264,8 +264,8 @@ or :cpp:type:`xt::xtensor`. .. code:: - #include - #include + #include + #include xt::xarray a = xt::ones({5, 8, 3}); xt::xarray res = xt::cumsum(a, 1); @@ -278,8 +278,8 @@ function. For example, the implementation of cumsum is as follows: .. code:: - #include - #include + #include + #include xt::xarray arr = some_init_function({5, 5, 5}); xt::xarray res = xt::accumulate([](double a, double b) { return a + b; }, @@ -292,8 +292,8 @@ with the same rules as those for reducers: .. code:: - #include - #include + #include + #include xt::xarray arr = some_init_function({5, 5, 5}); auto r1 = xt::cumsum(a, 1); @@ -323,8 +323,8 @@ Choosing an evaluation_strategy is straightforward. For reducers: .. code:: - #include - #include + #include + #include xt::xarray a = xt::ones({3, 2, 4, 6, 5}); auto res = xt::sum(a, {1, 3}, xt::evaluation_strategy::immediate); @@ -351,8 +351,8 @@ arguments: .. code:: - #include - #include + #include + #include int f(int a, int b) { diff --git a/docs/source/pitfall.rst b/docs/source/pitfall.rst index e986bb40c..0c404007f 100644 --- a/docs/source/pitfall.rst +++ b/docs/source/pitfall.rst @@ -142,7 +142,7 @@ Alignment of fixed-size members When building with *xsimd* (see :ref:`external-dependencies`), if you define a structure having members of fixed-size xtensor types, you must ensure that the buffers properly aligned. For this you can use the macro ``XTENSOR_FIXED_ALIGN`` available in -``xtensor/xtensor_config.hpp``. +``xtensor/core/xtensor_config.hpp``. Consider the following example: .. code-block:: cpp diff --git a/docs/source/quickref/basic.rst b/docs/source/quickref/basic.rst index ec23e8e33..2cd4b0d2b 100644 --- a/docs/source/quickref/basic.rst +++ b/docs/source/quickref/basic.rst @@ -27,7 +27,7 @@ Tensor with dynamic shape: .. code:: - #include + #include xt::xarray::shape_type shape = {2, 3}; xt::xarray a0(shape); @@ -39,7 +39,7 @@ Tensor with static number of dimensions: .. code:: - #include + #include xt::xtensor::shape_type shape = {2, 3}; xt::xtensor a0(shape); @@ -51,7 +51,7 @@ Tensor with fixed shape: .. code:: - #include + #include xt::xtensor_fixed> = {{1., 2., 3.}, {4., 5., 6.}}; @@ -59,7 +59,7 @@ In-memory chunked tensor with dynamic shape: .. code:: - #include + #include std::vector shape = {10, 10, 10}; std::vector chunk_shape = {2, 3, 4}; @@ -70,10 +70,10 @@ Output .. code:: - #include - #include - #include - #include + #include + #include + #include + #include xt::xarray a = {{1., 2.}, {3., 4.}}; std::cout << a << std::endl; diff --git a/docs/source/quickref/chunked_arrays.rst b/docs/source/quickref/chunked_arrays.rst index 46ac95265..2f25c9f3f 100644 --- a/docs/source/quickref/chunked_arrays.rst +++ b/docs/source/quickref/chunked_arrays.rst @@ -33,7 +33,7 @@ An in-memory chunked array has the following type: .. code:: - #include + #include using data_type = double; // don't use this code: @@ -44,7 +44,7 @@ use the ``chunked_array`` factory function: .. code:: - #include + #include std::vector shape = {10, 10, 10}; std::vector chunk_shape = {2, 3, 4}; diff --git a/docs/source/quickref/iterator.rst b/docs/source/quickref/iterator.rst index fd8abb494..6937aa371 100644 --- a/docs/source/quickref/iterator.rst +++ b/docs/source/quickref/iterator.rst @@ -14,7 +14,7 @@ Default iteration #include #include - #include + #include xt::xarray a = {{1, 2, 3}, {4, 5, 6}}; std::copy(a.begin(), a.end(), std::ostream_iterator(std::cout, ", ")); @@ -27,7 +27,7 @@ Specified traversal order #include #include - #include + #include xt::xarray a = {{1, 2, 3}, {4, 5, 6}}; std::copy(a.begin(), @@ -47,7 +47,7 @@ Broacasting iteration #include #include - #include + #include xt::xarray a = {{1, 2, 3}, {4, 5, 6}}; using shape_type = xt::dynamic_shape; @@ -73,9 +73,9 @@ Iterating over axis 0: .. code:: - #include - #include - #include + #include + #include + #include xarray a = {{{1, 2, 3, 4}, {5, 6, 7, 8}, @@ -108,9 +108,9 @@ Iterating over axis 1: .. code:: - #include - #include - #include + #include + #include + #include xarray a = {{{1, 2, 3, 4}, {5, 6, 7, 8}, @@ -139,9 +139,9 @@ Iterating over axis 2: .. code:: - #include - #include - #include + #include + #include + #include xarray a = {{{1, 2, 3, 4}, {5, 6, 7, 8}, @@ -171,9 +171,9 @@ Iterating over axis 0: .. code:: - #include - #include - #include + #include + #include + #include xarray a = {{{1, 2, 3, 4}, {5, 6, 7, 8}, @@ -200,9 +200,9 @@ Iterating over axis 1: .. code:: - #include - #include - #include + #include + #include + #include xarray a = {{{1, 2, 3, 4}, {5, 6, 7, 8}, @@ -229,9 +229,9 @@ Iterating over axis 2: .. code:: - #include - #include - #include + #include + #include + #include xarray a = {{{1, 2, 3, 4}, {5, 6, 7, 8}, diff --git a/docs/source/quickref/manipulation.rst b/docs/source/quickref/manipulation.rst index e59d4225c..d020d1fac 100644 --- a/docs/source/quickref/manipulation.rst +++ b/docs/source/quickref/manipulation.rst @@ -12,7 +12,7 @@ atleast_Nd .. code:: - #include + #include xt::xarray a0 = 123; auto r1 = xt::atleast_1d(a0); @@ -27,7 +27,7 @@ expand_dims .. code:: - #include + #include xt::xarray a = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; auto r0 = xt::expand_dims(a, 0); @@ -39,7 +39,7 @@ flip .. code:: - #include + #include xt::xarray a = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; auto f0 = xt::flip(a, 0); @@ -50,7 +50,7 @@ repeat .. code:: - #include + #include xt::xarray a = {{1, 2}, {3, 4}}; auto r0 = xt::repeat(a, 3, 1); @@ -61,7 +61,7 @@ roll .. code:: - #include + #include xt::xarray a = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; auto t0 = xt::roll(a, 2); @@ -72,7 +72,7 @@ rot90 .. code:: - #include + #include xt::xarray a = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; auto r0 = xt::rot90<1>(a); @@ -85,7 +85,7 @@ split .. code:: - #include + #include xt::xarray a = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; auto s0 = xt::split(a, 3); @@ -96,7 +96,7 @@ hsplit .. code:: - #include + #include xt::xarray a = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}}; auto res = xt::hsplit(a, 2); @@ -106,7 +106,7 @@ vsplit .. code:: - #include + #include xt::xarray a = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}}; auto res = xt::vsplit(a, 2); @@ -116,7 +116,7 @@ squeeze .. code:: - #include + #include auto b = xt::xarray::from_shape({3, 3, 1, 1, 2, 1, 3}); auto sq0 = xt::xqueeze(b); @@ -128,7 +128,7 @@ trim_zeros .. code:: - #include + #include xt::xarray a = {0, 0, 0, 1, 3, 0}; auto t0 = xt::trim_zeros(a); diff --git a/docs/source/related.rst b/docs/source/related.rst index dba06da63..97fa5ab30 100644 --- a/docs/source/related.rst +++ b/docs/source/related.rst @@ -37,7 +37,7 @@ Example 1: Use an algorithm of the C++ library on a NumPy array in-place #include // Standard library import for std::accumulate #include // Pybind11 import to define Python bindings - #include // xtensor import for the C++ universal functions + #include // xtensor import for the C++ universal functions #define FORCE_IMPORT_ARRAY // NumPy C api loading #include // NumPy bindings @@ -169,7 +169,7 @@ Example 1: Use an algorithm of the C++ library with a Julia array #include // Standard library import for std::accumulate #include // CxxWrap import to define Julia bindings #include // Import the jltensor container definition - #include // xtensor import for the C++ universal functions + #include // xtensor import for the C++ universal functions double sum_of_sines(xt::jltensor m) { @@ -280,7 +280,7 @@ Example 1: Use an algorithm of the C++ library on a R array in-place .. code:: #include // Standard library import for std::accumulate - #include // xtensor import for the C++ universal functions + #include // xtensor import for the C++ universal functions #include // R bindings #include @@ -339,13 +339,13 @@ Calculate the derivative of a (discretized) field in Fourier space, e.g. a sine .. code:: - #include // rfft, irfft - #include // rfftscale - #include - #include // xt::arange - #include // xt::sin, cos + #include // rfft, irfft + #include // rfftscale + #include + #include // xt::arange + #include // xt::sin, cos #include - #include + #include // generate a sinusoid field double dx = M_PI / 100; diff --git a/docs/source/scalar.rst b/docs/source/scalar.rst index deafc7696..8d74dc8a5 100644 --- a/docs/source/scalar.rst +++ b/docs/source/scalar.rst @@ -16,7 +16,7 @@ but resized to become a 0-D array containing the scalar value: .. code:: - #include + #include xt::xarray a = {{0., 1., 2.}, {3., 4., 5.}}; double s = 1.2; @@ -36,7 +36,7 @@ Assuming that the scalar assignment does not resize the array, we have the follo .. code:: - #include + #include xt::xarray a = {{0., 1., 2.}, {3., 4., 5.}}; double s = 1.2; @@ -48,7 +48,7 @@ This is not consistent with the behavior of the copy constructor from a scalar: .. code:: - #include + #include xt::xarray a(1.2); std::cout << a << std::endl; @@ -59,7 +59,7 @@ a scalar: .. code:: - #include + #include xt::xarray a = {{0., 1., 2.}, {3., 4., 5.}}; a = 1.2; diff --git a/docs/source/view.rst b/docs/source/view.rst index 66a3897b4..5348860b6 100644 --- a/docs/source/view.rst +++ b/docs/source/view.rst @@ -33,8 +33,8 @@ Slices can be specified in the following ways: .. code:: #include - #include - #include + #include + #include std::vector shape = {3, 2, 4}; xt::xarray a(shape); @@ -70,8 +70,8 @@ The range function supports the placeholder ``_`` syntax: .. code:: - #include - #include + #include + #include using namespace xt::placeholders; // required for ``_`` to work @@ -87,8 +87,8 @@ you are actually also altering the underlying expression. .. code:: #include - #include - #include + #include + #include std::vector shape = {3, 2, 4}; xt::xarray a(shape, 0); @@ -102,8 +102,8 @@ The convenient methods :cpp:func:`xt::row` and :cpp:func:`xt::col` are available .. code:: #include - #include - #include + #include + #include xt::xtensor a = {{1, 2}, {3, 4}}; auto r = xt::row(a, 0); @@ -125,8 +125,8 @@ The strided view does not support the slices returned by the :cpp:func:`xt::keep .. code:: - #include - #include + #include + #include auto a = xt::xarray::from_shape({3, 2, 3, 4, 5}); @@ -149,8 +149,8 @@ Since ``xtensor 0.16.3``, a new range syntax can be used with strided views: .. code:: - #include - #include + #include + #include using namespace xt::placeholders; @@ -171,8 +171,8 @@ Trying to build a transposed view on a expression with a dynamic layout throws a .. code:: - #include - #include + #include + #include xt::xarray a = { {0, 1, 2}, {3, 4, 5} }; auto tr = xt::transpose(a); @@ -194,8 +194,8 @@ uses the layout of the expression. .. code:: - #include - #include + #include + #include xt::xarray a = { {0, 1, 2}, {3, 4, 5} }; auto flc = xt::ravel(a); @@ -217,8 +217,8 @@ the view modifies the underlying expression. .. code:: - #include - #include + #include + #include auto a = xt::xarray::from_shape({3, 2, 4}); auto v = xt::reshape_view(a, { 4, 2, 3 }); @@ -240,7 +240,7 @@ keeping or dropping of a slice is involved. .. code:: - #include + #include #include auto a = xt::xarray::from_shape({3, 2, 3, 4, 5}); @@ -266,8 +266,8 @@ Index views should be built with the :cpp:func:`xt::index_view` helper function. .. code:: - #include - #include + #include + #include xt::xarray a = {{1, 5, 3}, {4, 5, 6}}; auto b = xt::index_view(a, {{0,0}, {1, 0}, {0, 1}}); @@ -280,8 +280,8 @@ The same stands for the type of the list of indices: .. code:: - #include - #include + #include + #include xt::xarray a = {{1, 5, 3}, {4, 5, 6}}; using index_type = std::array; @@ -300,8 +300,8 @@ Filters should be built with the :cpp:func:`xt::filter` helper function. .. code:: - #include - #include + #include + #include xt::xarray a = {{1, 5, 3}, {4, 5, 6}}; auto v = xt::filter(a, a >= 5); @@ -320,8 +320,8 @@ computed scalar assignments. .. code:: - #include - #include + #include + #include xt::xarray a = {{1, 5, 3}, {4, 5, 6}}; filtration(a, a >= 5) += 100; @@ -334,8 +334,8 @@ Masked views are multidimensional views that apply a mask on an :cpp:type:`xt::x .. code:: - #include - #include + #include + #include xt::xarray a = {{1, 5, 3}, {4, 5, 6}}; xt::xarray mask = {{true, false, false}, {false, true, false}}; @@ -357,8 +357,8 @@ Broadcasting views should be built with the :cpp:func:`xt::broadcast` helper fun .. code:: #include - #include - #include + #include + #include std::vector s1 = { 2, 3 }; std::vector s2 = { 3, 2, 3 }; @@ -390,8 +390,8 @@ The returned value is an expression holding a closure on the passed argument. .. code:: #include - #include - #include + #include + #include using namespace std::complex_literals; @@ -411,8 +411,8 @@ However, since views *cannot be resized*, when assigning an expression to a view .. code:: - #include - #include + #include + #include xarray a = {{0., 1., 2.}, {3., 4., 5.}}; double b = 1.2; diff --git a/docs/source/xfft.rst b/docs/source/xfft.rst index b506c8157..20eed9619 100644 --- a/docs/source/xfft.rst +++ b/docs/source/xfft.rst @@ -4,7 +4,7 @@ xfft ==== -Defined in ``xtensor/xfft.hpp`` +Defined in ``xtensor/misc/xfft.hpp`` .. doxygenclass:: xt::fft::convolve :project: xtensor