diff --git a/docs/source/api/accumulating_functions.rst b/docs/source/api/accumulating_functions.rst index edcc26909..1842912e1 100644 --- a/docs/source/api/accumulating_functions.rst +++ b/docs/source/api/accumulating_functions.rst @@ -11,10 +11,5 @@ Accumulating functions Defined in ``xtensor/core/xmath.hpp`` -.. doxygenfunction:: cumsum(E&&) - -.. doxygenfunction:: cumsum(E&&, std::ptrdiff_t) - -.. doxygenfunction:: cumprod(E&&) - -.. doxygenfunction:: cumprod(E&&, std::ptrdiff_t) +.. doxygengroup:: acc_functions + :members: diff --git a/docs/source/api/basic_functions.rst b/docs/source/api/basic_functions.rst index c96e34d66..c6e8020b8 100644 --- a/docs/source/api/basic_functions.rst +++ b/docs/source/api/basic_functions.rst @@ -11,26 +11,5 @@ Basic functions Defined in ``xtensor/core/xmath.hpp`` -.. doxygenfunction:: abs(E&&) - -.. doxygenfunction:: fabs(E&&) - -.. doxygenfunction:: fmod(E1&&, E2&&) - -.. doxygenfunction:: remainder(E1&&, E2&&) - -.. doxygenfunction:: fma(E1&&, E2&&, E3&&) - -.. doxygenfunction:: maximum(E1&&, E2&&) - -.. doxygenfunction:: minimum(E1&&, E2&&) - -.. doxygenfunction:: fmax(E1&&, E2&&) - -.. doxygenfunction:: fmin(E1&&, E2&&) - -.. doxygenfunction:: fdim(E1&&, E2&&) - -.. doxygenfunction:: clip(E1&&, E2&&, E3&&) - -.. doxygenfunction:: sign(E&&) +.. doxygengroup:: basic_functions + :members: diff --git a/docs/source/api/classif_functions.rst b/docs/source/api/classif_functions.rst index d170f737b..f39602b2b 100644 --- a/docs/source/api/classif_functions.rst +++ b/docs/source/api/classif_functions.rst @@ -11,12 +11,5 @@ Classification functions Defined in ``xtensor/core/xmath.hpp`` -.. doxygenfunction:: isfinite(E&&) - -.. doxygenfunction:: isinf(E&&) - -.. doxygenfunction:: isnan(E&&) - -.. doxygenfunction:: isclose(E1&&, E2&&, double, double, bool) - -.. doxygenfunction:: allclose(E1&&, E2&, double, double) +.. doxygengroup:: classif_functions + :members: diff --git a/docs/source/api/error_functions.rst b/docs/source/api/error_functions.rst index 7b335e4cc..be2312f08 100644 --- a/docs/source/api/error_functions.rst +++ b/docs/source/api/error_functions.rst @@ -11,10 +11,5 @@ Error and gamma functions Defined in ``xtensor/core/xmath.hpp`` -.. doxygenfunction:: erf(E&&) - -.. doxygenfunction:: erfc(E&&) - -.. doxygenfunction:: tgamma(E&&) - -.. doxygenfunction:: lgamma(E&&) +.. doxygengroup:: err_functions + :members: diff --git a/docs/source/api/exponential_functions.rst b/docs/source/api/exponential_functions.rst index e2202dd67..65caeed74 100644 --- a/docs/source/api/exponential_functions.rst +++ b/docs/source/api/exponential_functions.rst @@ -11,16 +11,5 @@ Exponential functions Defined in ``xtensor/core/xmath.hpp`` -.. doxygenfunction:: exp(E&&) - -.. doxygenfunction:: exp2(E&&) - -.. doxygenfunction:: expm1(E&&) - -.. doxygenfunction:: log(E&&) - -.. doxygenfunction:: log2(E&&) - -.. doxygenfunction:: log10(E&&) - -.. doxygenfunction:: log1p(E&&) +.. doxygengroup:: exp_functions + :members: diff --git a/docs/source/api/hyperbolic_functions.rst b/docs/source/api/hyperbolic_functions.rst index e7e835104..757c77409 100644 --- a/docs/source/api/hyperbolic_functions.rst +++ b/docs/source/api/hyperbolic_functions.rst @@ -11,20 +11,5 @@ Hyperbolic functions Defined in ``xtensor/core/xmath.hpp`` -.. _sinh-function-reference: -.. doxygenfunction:: sinh(E&&) - -.. _cosh-function-reference: -.. doxygenfunction:: cosh(E&&) - -.. _tanh-function-reference: -.. doxygenfunction:: tanh(E&&) - -.. _asinh-func-ref: -.. doxygenfunction:: asinh(E&&) - -.. _acosh-func-ref: -.. doxygenfunction:: acosh(E&&) - -.. _atanh-func-ref: -.. doxygenfunction:: atanh(E&&) +.. doxygengroup:: hyper_functions + :members: diff --git a/docs/source/api/index_related.rst b/docs/source/api/index_related.rst index 7f74c758e..f7de8fdc2 100644 --- a/docs/source/api/index_related.rst +++ b/docs/source/api/index_related.rst @@ -9,10 +9,7 @@ Index related functions Defined in ``xtensor/core/xoperation.hpp`` -.. doxygenfunction:: where(const T&) +The logical operator group documents the index-producing overloads of +``xt::where``, ``xt::nonzero`` and ``xt::argwhere``. -.. doxygenfunction:: nonzero(const T&) - -.. doxygenfunction:: argwhere - -.. doxygenfunction:: from_indices +``xt::from_indices`` is documented on the ``xtensor`` API page. diff --git a/docs/source/api/nan_functions.rst b/docs/source/api/nan_functions.rst index 5b35e5c0f..918039bce 100644 --- a/docs/source/api/nan_functions.rst +++ b/docs/source/api/nan_functions.rst @@ -11,26 +11,5 @@ NaN functions Defined in ``xtensor/core/xmath.hpp`` -.. doxygenfunction:: nan_to_num(E&&) - -.. doxygenfunction:: nanmin(E&&, X&&, EVS) - -.. doxygenfunction:: nanmax(E&&, X&&, EVS) - -.. doxygenfunction:: nansum(E&&, X&&, EVS) - -.. doxygenfunction:: nanmean(E&&, X&&, EVS) - -.. doxygenfunction:: nanvar(E&&, X&&, EVS) - -.. doxygenfunction:: nanstd(E&&, X&&, EVS) - -.. doxygenfunction:: nanprod(E&&, X&&, EVS) - -.. doxygenfunction:: nancumsum(E&&) - -.. doxygenfunction:: nancumsum(E&&, std::ptrdiff_t) - -.. doxygenfunction:: nancumprod(E&&) - -.. doxygenfunction:: nancumprod(E&&, std::ptrdiff_t) +.. doxygengroup:: nan_functions + :members: diff --git a/docs/source/api/nearint_operations.rst b/docs/source/api/nearint_operations.rst index c4ba6832c..59dd61d19 100644 --- a/docs/source/api/nearint_operations.rst +++ b/docs/source/api/nearint_operations.rst @@ -11,14 +11,5 @@ Nearest integer floating point operations Defined in ``xtensor/core/xmath.hpp`` -.. doxygenfunction:: ceil(E&&) - -.. doxygenfunction:: floor(E&&) - -.. doxygenfunction:: trunc(E&&) - -.. doxygenfunction:: round(E&&) - -.. doxygenfunction:: nearbyint(E&&) - -.. doxygenfunction:: rint(E&&) +.. doxygengroup:: nearint_functions + :members: diff --git a/docs/source/api/operators.rst b/docs/source/api/operators.rst index 32a474221..00df9458d 100644 --- a/docs/source/api/operators.rst +++ b/docs/source/api/operators.rst @@ -9,68 +9,17 @@ Operators and related functions Defined in ``xtensor/core/xmath.hpp`` and ``xtensor/core/xoperation.hpp`` -.. doxygenfunction:: operator+(E&&) +.. doxygengroup:: arithmetic_operators + :members: -.. doxygenfunction:: operator-(E&&) +.. doxygengroup:: logical_operators + :members: -.. doxygenfunction:: operator+(E1&&, E2&&) +.. doxygengroup:: comparison_operators + :members: -.. doxygenfunction:: operator-(E1&&, E2&&) +.. doxygengroup:: bitwise_operators + :members: -.. doxygenfunction:: operator*(E1&&, E2&&) - -.. doxygenfunction:: operator/(E1&&, E2&&) - -.. doxygenfunction:: operator||(E1&&, E2&&) - -.. doxygenfunction:: operator&&(E1&&, E2&&) - -.. doxygenfunction:: operator!(E&&) - -.. doxygenfunction:: where(E1&&, E2&&, E3&&) - -.. doxygenfunction:: any(E&&) - -.. doxygenfunction:: all(E&&) - -.. doxygenfunction:: operator<(E1&&, E2&&) - -.. doxygenfunction:: operator<=(E1&&, E2&&) - -.. doxygenfunction:: operator>(E1&&, E2&&) - -.. doxygenfunction:: operator>=(E1&&, E2&&) - -.. doxygenfunction:: operator==(const xexpression&, const xexpression&) - -.. doxygenfunction:: operator!=(const xexpression&, const xexpression&) - -.. doxygenfunction:: equal(E1&&, E2&&) - -.. doxygenfunction:: not_equal(E1&&, E2&&) - -.. doxygenfunction:: less(E1&& e1, E2&& e2) - -.. doxygenfunction:: less_equal(E1&& e1, E2&& e2) - -.. doxygenfunction:: greater(E1&& e1, E2&& e2) - -.. doxygenfunction:: greater_equal(E1&& e1, E2&& e2) - -.. doxygenfunction:: operator&(E1&&, E2&&) - -.. doxygenfunction:: operator|(E1&&, E2&&) - -.. doxygenfunction:: operator^(E1&&, E2&&) - -.. doxygenfunction:: operator~(E&&) - -.. doxygenfunction:: left_shift(E1&&, E2&&) - -.. doxygenfunction:: right_shift(E1&&, E2&&) - -.. doxygenfunction:: operator<<(E1&&, E2&&) - -.. doxygenfunction:: operator>>(E1&&, E2&&) - -.. doxygenfunction:: cast(E&&) +.. doxygengroup:: casting_operators + :members: diff --git a/docs/source/api/power_functions.rst b/docs/source/api/power_functions.rst index a11b5ba27..5ac5a1546 100644 --- a/docs/source/api/power_functions.rst +++ b/docs/source/api/power_functions.rst @@ -12,16 +12,5 @@ Power functions Defined in ``xtensor/core/xmath.hpp`` -.. doxygenfunction:: pow(E1&&, E2&&) - -.. doxygenfunction:: pow(E&&) - -.. doxygenfunction:: square(E1&&) - -.. doxygenfunction:: cube(E1&&) - -.. doxygenfunction:: sqrt(E&&) - -.. doxygenfunction:: cbrt(E&&) - -.. doxygenfunction:: hypot(E1&&, E2&&) +.. doxygengroup:: pow_functions + :members: diff --git a/docs/source/api/reducing_functions.rst b/docs/source/api/reducing_functions.rst index 223e57a92..89c0baff5 100644 --- a/docs/source/api/reducing_functions.rst +++ b/docs/source/api/reducing_functions.rst @@ -9,62 +9,7 @@ Reducing functions **xtensor** provides the following reducing functions for xexpressions: -Defined in ``xtensor/core/xmath.hpp`` +Defined in ``xtensor/core/xmath.hpp`` and ``xtensor/reducers/xnorm.hpp``. -.. doxygenfunction:: sum(E&&, EVS) - -.. doxygenfunction:: sum(E&&, X&&, EVS) - -.. doxygenfunction:: prod(E&&, EVS) - -.. doxygenfunction:: prod(E&&, X&&, EVS) - -.. doxygenfunction:: mean(E&&, EVS) - -.. doxygenfunction:: mean(E&&, X&&, EVS) - -.. doxygenfunction:: average(E&&, EVS) - -.. doxygenfunction:: variance(E&&, EVS) - -.. doxygenfunction:: variance(E&&, X&&, EVS) - -.. doxygenfunction:: variance(E&&, X&&, const D&, EVS) - -.. doxygenfunction:: stddev(E&&, EVS) - -.. doxygenfunction:: stddev(E&&, X&&, EVS) - -.. doxygenfunction:: diff(const xexpression&, unsigned int, std::ptrdiff_t) - -.. doxygenfunction:: amax(E&&, EVS) - -.. doxygenfunction:: amax(E&&, X&&, EVS) - -.. doxygenfunction:: amin(E&&, EVS) - -.. doxygenfunction:: amin(E&&, X&&, EVS) - -.. doxygenfunction:: trapz(const xexpression&, double, std::ptrdiff_t) - -.. doxygenfunction:: trapz(const xexpression&, const xexpression&, std::ptrdiff_t) - -Defined in ``xtensor/reducers/xnorm.hpp`` - -.. doxygenfunction:: norm_l0(E&&, X&&, EVS) - -.. doxygenfunction:: norm_l1(E&&, X&&, EVS) - -.. doxygenfunction:: norm_sq(E&&, X&&, EVS) - -.. doxygenfunction:: norm_l2(E&&, X&&, EVS) - -.. doxygenfunction:: norm_linf(E&&, X&&, EVS) - -.. doxygenfunction:: norm_lp_to_p(E&&, double, X&&, EVS) - -.. doxygenfunction:: norm_lp(E&&, double, X&&, EVS) - -.. doxygenfunction:: norm_induced_l1(E&&, EVS) - -.. doxygenfunction:: norm_induced_linf(E&&, EVS) +.. doxygengroup:: red_functions + :members: diff --git a/docs/source/api/trigonometric_functions.rst b/docs/source/api/trigonometric_functions.rst index 6234470d0..e76d151b5 100644 --- a/docs/source/api/trigonometric_functions.rst +++ b/docs/source/api/trigonometric_functions.rst @@ -11,16 +11,5 @@ Trigonometric functions Defined in ``xtensor/core/xmath.hpp`` -.. doxygenfunction:: sin(E&&) - -.. doxygenfunction:: cos(E&&) - -.. doxygenfunction:: tan(E&&) - -.. doxygenfunction:: asin(E&&) - -.. doxygenfunction:: acos(E&&) - -.. doxygenfunction:: atan(E&&) - -.. doxygenfunction:: atan2(E1&&, E2&&) +.. doxygengroup:: trigo_functions + :members: diff --git a/docs/source/api/xaccessible.rst b/docs/source/api/xaccessible.rst new file mode 100644 index 000000000..237fc029d --- /dev/null +++ b/docs/source/api/xaccessible.rst @@ -0,0 +1,16 @@ +.. Copyright (c) 2016, Johan Mabille, Sylvain Corlay and Wolf Vollprecht + + Distributed under the terms of the BSD 3-Clause License. + + The full license is in the file LICENSE, distributed with this software. + +xaccessible +=========== + +Defined in ``xtensor/core/xaccessible.hpp`` + +.. doxygenclass:: xt::xconst_accessible + :members: + +.. doxygenclass:: xt::xaccessible + :members: diff --git a/docs/source/api/xbuilder.rst b/docs/source/api/xbuilder.rst index db358f88e..b315c3730 100644 --- a/docs/source/api/xbuilder.rst +++ b/docs/source/api/xbuilder.rst @@ -19,7 +19,7 @@ Defined in ``xtensor/generators/xbuilder.hpp`` .. doxygenfunction:: xt::empty(const S&) -.. doxygenfunction:: xt::full_like(const xexpression&) +.. doxygenfunction:: xt::full_like(const xexpression&, typename E::value_type) .. doxygenfunction:: xt::empty_like(const xexpression&) diff --git a/docs/source/api/xfft.rst b/docs/source/api/xfft.rst new file mode 100644 index 000000000..a05766ff7 --- /dev/null +++ b/docs/source/api/xfft.rst @@ -0,0 +1,16 @@ +.. Copyright (c) 2016, Johan Mabille, Sylvain Corlay and Wolf Vollprecht + + Distributed under the terms of the BSD 3-Clause License. + + The full license is in the file LICENSE, distributed with this software. + +xfft +==== + +Defined in ``xtensor/misc/xfft.hpp`` + +.. doxygenfunction:: xt::fft::fft(E&&, std::ptrdiff_t) + +.. doxygenfunction:: xt::fft::ifft(E&&, std::ptrdiff_t) + +.. doxygenfunction:: xt::fft::convolve(E1&&, E2&&, std::ptrdiff_t) diff --git a/docs/source/api/xhistogram.rst b/docs/source/api/xhistogram.rst index 71b05c89b..4d1e3e639 100644 --- a/docs/source/api/xhistogram.rst +++ b/docs/source/api/xhistogram.rst @@ -9,35 +9,14 @@ xhistogram Defined in ``xtensor/misc/xhistogram.hpp`` -.. doxygenenum:: xt::histogram_algorithm +.. doxygengroup:: digitize + :members: -.. doxygenfunction:: xt::histogram(E1&&, E2&&, E3&&, bool) +.. doxygengroup:: histogram + :members: .. doxygenfunction:: xt::bincount(E1&&, E2&&, std::size_t) -.. doxygenfunction:: xt::histogram_bin_edges(E1&&, E2&&, E3, E3, std::size_t, histogram_algorithm) - -.. doxygenfunction:: xt::digitize(E1&&, E2&&, E3&&, bool, bool) - .. doxygenfunction:: xt::bin_items(size_t, E&&) -Further overloads ------------------ - -.. doxygenfunction:: xt::histogram(E1&&, E2&&, bool) - -.. doxygenfunction:: xt::histogram(E1&&, std::size_t, bool) - -.. doxygenfunction:: xt::histogram(E1&&, std::size_t, E2, E2, bool) - -.. doxygenfunction:: xt::histogram(E1&&, std::size_t, E2&&, bool) - -.. doxygenfunction:: xt::histogram(E1&&, std::size_t, E2&&, E3, E3, bool) - -.. doxygenfunction:: xt::histogram_bin_edges(E1&&, E2, E2, std::size_t, histogram_algorithm) - -.. doxygenfunction:: xt::histogram_bin_edges(E1&&, E2&&, std::size_t, histogram_algorithm) - -.. doxygenfunction:: xt::histogram_bin_edges(E1&&, std::size_t, histogram_algorithm) - .. doxygenfunction:: xt::bin_items(size_t, size_t) diff --git a/docs/source/api/xjson.rst b/docs/source/api/xjson.rst index 7a11957a5..138c5b9de 100644 --- a/docs/source/api/xjson.rst +++ b/docs/source/api/xjson.rst @@ -9,6 +9,10 @@ xjson: serialize to/from JSON Defined in ``xtensor/io/xjson.hpp`` -.. doxygenfunction:: xt::to_json(nlohmann::json&, const E&); +Available overload families +--------------------------- -.. doxygenfunction:: xt::from_json(const nlohmann::json&, E&); +- ``xt::to_json(nlohmann::basic_json&, const E&)`` +- ``xt::from_json(const nlohmann::basic_json&, E&)`` + +``xt::from_json`` is provided for both container and view semantics. diff --git a/docs/source/api/xreducer.rst b/docs/source/api/xreducer.rst index 85ee2a09a..4e896e099 100644 --- a/docs/source/api/xreducer.rst +++ b/docs/source/api/xreducer.rst @@ -12,4 +12,9 @@ Defined in ``xtensor/reducers/xreducer.hpp`` .. doxygenclass:: xt::xreducer :members: -.. doxygenfunction:: xt::reduce(F&&, E&&, X&&, EVS&&) +Available overload families +--------------------------- + +- ``xt::reduce(f, e, axes, options)`` +- ``xt::reduce(f, e, options)`` +- ``xt::reduce(f, e, const I (&axes)[N], options)`` diff --git a/docs/source/api/xset_operation.rst b/docs/source/api/xset_operation.rst index 31b25126c..14ea65cda 100644 --- a/docs/source/api/xset_operation.rst +++ b/docs/source/api/xset_operation.rst @@ -9,19 +9,13 @@ xset_operation Defined in ``xtensor/misc/xset_operation.hpp`` -.. doxygenenum:: xt::isin(E&&, F&&) +``xt::searchsorted(a, v, right)`` returns insertion indices for values ``v`` +in the sorted array ``a``. -.. doxygenenum:: xt::in1d(E&&, F&&) +Available functions +------------------- -.. doxygenenum:: xt::searchsorted(E1&&, E2&&, bool) - -Further overloads ------------------ - -.. doxygenenum:: xt::isin(E&&, std::initializer_list) - -.. doxygenenum:: xt::isin(E&&, I&&, I&&) - -.. doxygenenum:: xt::in1d(E&&, std::initializer_list) - -.. doxygenenum:: xt::in1d(E&&, I&&, I&&) +- ``xt::isin(element, test_elements)`` +- ``xt::in1d(element, test_elements)`` +- ``xt::isin(element, begin, end)`` +- ``xt::in1d(element, begin, end)`` diff --git a/docs/source/api/xview.rst b/docs/source/api/xview.rst index 9652ea26a..d9e72ad72 100644 --- a/docs/source/api/xview.rst +++ b/docs/source/api/xview.rst @@ -10,7 +10,6 @@ xview Defined in ``xtensor/views/xview.hpp`` .. doxygenclass:: xt::xview - :members: .. doxygenfunction:: xt::view diff --git a/docs/source/build-options.rst b/docs/source/build-options.rst index b076c422b..25e32ceb9 100644 --- a/docs/source/build-options.rst +++ b/docs/source/build-options.rst @@ -120,4 +120,4 @@ Notice that this option prevents building on a machine and distributing the resu a different architecture (i.e. not supporting the same instruction set). .. _xsimd: https://github.com/xtensor-stack/xsimd -.. _tbb: https://www.threadingbuildingblocks.org +.. _tbb: https://github.com/uxlfoundation/oneTBB diff --git a/docs/source/dev-build-options.rst b/docs/source/dev-build-options.rst index 67fbab9a6..c4b12a8fe 100644 --- a/docs/source/dev-build-options.rst +++ b/docs/source/dev-build-options.rst @@ -100,4 +100,4 @@ You can then build the documentation: Type ``make help`` to see the list of available documentation targets. .. _xsimd: https://github.com/xtensor-stack/xsimd -.. _tbb: https://www.threadingbuildingblocks.org +.. _tbb: https://github.com/uxlfoundation/oneTBB diff --git a/docs/source/expression.rst b/docs/source/expression.rst index 0fec517f7..8aa5d7324 100644 --- a/docs/source/expression.rst +++ b/docs/source/expression.rst @@ -232,5 +232,5 @@ Iterators :cpp:func:`begin(shape) ` and :cpp:func:`end(shape) `. -.. _NumPy: http://www.numpy.org +.. _NumPy: https://numpy.org/ .. _libdynd: http://libdynd.org diff --git a/docs/source/external-structures.rst b/docs/source/external-structures.rst index 1eb048138..4d82738f2 100644 --- a/docs/source/external-structures.rst +++ b/docs/source/external-structures.rst @@ -47,7 +47,7 @@ Adapting a pointer ------------------ Suppose that you want to use the *xtensor* machinery on a small contiguous subset of a large tensor. -You can, of course, use :ref:`Views`, but for efficiency you can also use pointers to the right bit of memory. +You can, of course, use :ref:`view-description`, but for efficiency you can also use pointers to the right bit of memory. Consider an example of an ``[M, 2, 2]`` tensor ``A``, for which you want to operate on ``A[i, :, :]`` for different ``i``. In this case the most efficient *xtensor* has to offer is: diff --git a/docs/source/index.rst b/docs/source/index.rst index 2aea4cb71..d28e135ea 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -119,7 +119,7 @@ for details. related bindings -.. _NumPy: http://www.numpy.org +.. _NumPy: https://numpy.org/ .. _Buffer Protocol: https://docs.python.org/3/c-api/buffer.html .. _libdynd: http://libdynd.org .. _xtensor-python: https://github.com/xtensor-stack/xtensor-python diff --git a/docs/source/quickref/chunked_arrays.rst b/docs/source/quickref/chunked_arrays.rst index 2f25c9f3f..e645cea73 100644 --- a/docs/source/quickref/chunked_arrays.rst +++ b/docs/source/quickref/chunked_arrays.rst @@ -17,7 +17,7 @@ the chunks fit comfortably in memory, but this also allows to process them in parallel, including in a distributed environment (although this is not supported yet). -Formats for the storage of arrays such as `Zarr `_ +Formats for the storage of arrays such as `Zarr `_ specifically target chunked arrays. Such formats are becoming increasingly popular in the field of big data, since the chunks can be stored in the cloud. @@ -66,4 +66,4 @@ persistence of data. In particular, they are used as a building block for the `xtensor-zarr `_ library. For further details, please refer to the documentation -of `xtensor-io `_. +of `xtensor-io `_. diff --git a/docs/source/random.rst b/docs/source/random.rst index 69e51384a..c0f555664 100644 --- a/docs/source/random.rst +++ b/docs/source/random.rst @@ -67,8 +67,8 @@ where :math:`\alpha` is the shape (also known as :math:`k`) and :math:`\beta` th .. seealso:: * :any:`numpy.random.gamma` - * `std::gamma_distribution `_ - * `Weisstein, Eric W. "Gamma Distribution." From MathWorld – A Wolfram Web Resource. `_ + * `std::gamma_distribution `_ + * `Weisstein, Eric W. "Gamma Distribution." From MathWorld – A Wolfram Web Resource. `_ * `Wikipedia, "Gamma distribution". `_ :cpp:func:`xt::random::weibull` @@ -100,7 +100,7 @@ Note that you can specify only :math:`a` while choosing the default for :math:`b .. seealso:: * :any:`numpy.random.weibull` - * `std::weibull_distribution `_ + * `std::weibull_distribution `_ * `Wikipedia, "Weibull distribution". `_ :cpp:func:`xt::random::extreme_value` diff --git a/docs/source/related.rst b/docs/source/related.rst index 97fa5ab30..60c640272 100644 --- a/docs/source/related.rst +++ b/docs/source/related.rst @@ -453,12 +453,12 @@ and also provides a python wrapper based on ``xtensor-python``. .. _xtensor-r: https://github.com/xtensor-stack/xtensor-r .. _xtensor-blas: https://github.com/xtensor-stack/xtensor-blas .. _xtensor-io: https://github.com/xtensor-stack/xtensor-io -.. _xtensor-fftw: https://github.com/egpbos/xtensor-fftw -.. _xtensor-ros: https://github.com/wolfv/xtensor_ros +.. _xtensor-fftw: https://github.com/xtensor-stack/xtensor-fftw +.. _xtensor-ros: https://github.com/RoboStack/xtensor-ros .. _xsimd: https://github.com/xtensor-stack/xsimd .. _xtl: https://github.com/xtensor-stack/xtl .. _xframe: https://github.com/xtensor-stack/xframe .. _z5: https://github.com/constantinpape/z5 -.. _zarr: https://github.com/zarr-developers/zarr -.. _n5: https://github.com/saalfeldlab/n5i -.. _xarray: http://xarray.pydata.org +.. _zarr: https://github.com/zarr-developers/zarr-python +.. _n5: https://github.com/saalfeldlab/n5 +.. _xarray: https://docs.xarray.dev/en/stable/ diff --git a/docs/source/view.rst b/docs/source/view.rst index 5348860b6..95b6365b8 100644 --- a/docs/source/view.rst +++ b/docs/source/view.rst @@ -159,9 +159,9 @@ Since ``xtensor 0.16.3``, a new range syntax can be used with strided views: // The previous line is equivalent to auto v2 = xt::strided_view(a, {xt::range(0, 1), 1, xt::range(_, 2), xt::range(_, _, -1)}); -The :cpp:type:`xt::xstrided_view` is very efficient on contigous memory -(e.g. :cpp:type:`xt::xtensor` or :cpp:type:`xt::xarray`) but less efficient on\ -:cpp:type:`xt::xexpression`s. +The :cpp:type:`xt::xstrided_view` type is very efficient on contigous memory +(e.g. :cpp:type:`xt::xtensor` or :cpp:type:`xt::xarray`) but less efficient on +generic :cpp:type:`xt::xexpression` objects. Transposed views ---------------- diff --git a/include/xtensor/chunk/xchunked_array.hpp b/include/xtensor/chunk/xchunked_array.hpp index 53a53aba1..dc0c16355 100644 --- a/include/xtensor/chunk/xchunked_array.hpp +++ b/include/xtensor/chunk/xchunked_array.hpp @@ -19,7 +19,7 @@ namespace xt { /** - * @defgroup xt_xchunked_array + * @defgroup xt_xchunked_array Chunked array * * Chunked array container. * Defined in ``xtensor/xchunked_array.hpp``. diff --git a/include/xtensor/core/xeval.hpp b/include/xtensor/core/xeval.hpp index 231f47312..5ccbc1db9 100644 --- a/include/xtensor/core/xeval.hpp +++ b/include/xtensor/core/xeval.hpp @@ -18,7 +18,7 @@ namespace xt { /** - * @defgroup xt_xeval + * @defgroup xt_xeval Evaluation * * Evaluation functions. * Defined in ``xtensor/xeval.hpp`` diff --git a/include/xtensor/core/xshape.hpp b/include/xtensor/core/xshape.hpp index 28fbe43cc..61650bb87 100644 --- a/include/xtensor/core/xshape.hpp +++ b/include/xtensor/core/xshape.hpp @@ -122,7 +122,7 @@ namespace xt * Check if an object has a certain shape. * * @ingroup xt_xshape - * @param a an array + * @param e an array-like object * @param shape the shape to test * @return bool */ @@ -136,8 +136,8 @@ namespace xt /** * Check if an object has a certain shape. * - * @ingroup has_shape - * @param a an array + * @ingroup xt_xshape + * @param e an array-like object * @param shape the shape to test * @return bool */ diff --git a/include/xtensor/core/xstrides.hpp b/include/xtensor/core/xstrides.hpp index f8735f7e3..d413fcd26 100644 --- a/include/xtensor/core/xstrides.hpp +++ b/include/xtensor/core/xstrides.hpp @@ -59,7 +59,8 @@ namespace xt * * @ingroup xt_xstrides * @param strides Strides of the array. - * @param args Array index. + * @param arg First array index. + * @param args Remaining array indices. * @return The flat index. */ template @@ -241,7 +242,8 @@ namespace xt * @brief Get strides of an object. * * @ingroup xt_xstrides - * @param a an array + * @param e an array + * @param type output stride convention * @return array */ template @@ -285,7 +287,9 @@ namespace xt * @brief Get stride of an object along an axis. * * @ingroup xt_xstrides - * @param a an array + * @param e an array + * @param axis axis along which to query the stride + * @param type output stride convention * @return integer */ template diff --git a/include/xtensor/generators/xbuilder.hpp b/include/xtensor/generators/xbuilder.hpp index 8a2f61147..5ba9f7a36 100644 --- a/include/xtensor/generators/xbuilder.hpp +++ b/include/xtensor/generators/xbuilder.hpp @@ -146,7 +146,7 @@ namespace xt * the same shape, value type and layout as the input xexpression *e*. * * Note: contrary to zeros(shape), this function returns a non-lazy, allocated container! - * Use ``xt::zeros(e.shape());` for a lazy version. + * Use ``xt::zeros(e.shape());`` for a lazy version. * * @param e the xexpression from which to extract shape, value type and layout. */ diff --git a/include/xtensor/generators/xrandom.hpp b/include/xtensor/generators/xrandom.hpp index 5e365f667..d43a69876 100644 --- a/include/xtensor/generators/xrandom.hpp +++ b/include/xtensor/generators/xrandom.hpp @@ -914,15 +914,16 @@ namespace xt * * For weighted random sampling with replacement, binary search with cumulative weights alogrithm is * used. For weighted random sampling without replacement, the algorithm used is the exponential sort - * from [Efraimidis and Spirakis](https://doi.org/10.1016/j.ipl.2005.11.003) (2006) with the ``weight - * / randexp(1)`` [trick](https://web.archive.org/web/20201021162211/https://krlmlr.github.io/wrswoR/) - * from Kirill Müller. + * from [Efraimidis and Spirakis](https://linkinghub.elsevier.com/retrieve/pii/S002001900500298X) + * (2006) with the ``weight / randexp(1)`` + * [trick](https://web.archive.org/web/20201021162211/https://krlmlr.github.io/wrswoR/) from Kirill + * Müller. * * Note: this function makes a copy of your data, and only 1D data is accepted. * * @param e expression to sample from * @param n number of elements to sample - * @param w expression for the weight distribution. + * @param weights expression for the weight distribution. * Weights must be positive and real-valued but need not sum to 1. * @param replace set true to sample with replacement * @param engine random number engine diff --git a/include/xtensor/misc/xcomplex.hpp b/include/xtensor/misc/xcomplex.hpp index 308218f60..c803bb77c 100644 --- a/include/xtensor/misc/xcomplex.hpp +++ b/include/xtensor/misc/xcomplex.hpp @@ -23,7 +23,7 @@ namespace xt { /** - * @defgroup xt_xcomplex + * @defgroup xt_xcomplex Complex numbers * * Defined in ``xtensor/xcomplex.hpp`` */ diff --git a/include/xtensor/misc/xhistogram.hpp b/include/xtensor/misc/xhistogram.hpp index b8fdd9da1..a389c4fb9 100644 --- a/include/xtensor/misc/xhistogram.hpp +++ b/include/xtensor/misc/xhistogram.hpp @@ -23,6 +23,11 @@ using namespace xt::placeholders; namespace xt { + /** + * @defgroup digitize Digitize helpers + * @brief Helpers for assigning values to histogram bins. + */ + /** * @ingroup digitize * @brief Return the indices of the bins to which each value in input array belongs. @@ -128,6 +133,11 @@ namespace xt } // detail + /** + * @defgroup histogram Histogram functions + * @brief Helpers for computing histograms and histogram bin edges. + */ + /** * @ingroup histogram * @brief Compute the histogram of a set of data. diff --git a/include/xtensor/misc/xmanipulation.hpp b/include/xtensor/misc/xmanipulation.hpp index f100744ac..2d540539b 100644 --- a/include/xtensor/misc/xmanipulation.hpp +++ b/include/xtensor/misc/xmanipulation.hpp @@ -27,7 +27,7 @@ namespace xt { /** - * @defgroup xt_xmanipulation + * @defgroup xt_xmanipulation Array manipulation */ namespace check_policy @@ -1099,7 +1099,7 @@ namespace xt * @param repeats The number of repetition of each elements. * @p repeats is broadcasted to fit the shape of the given @p axis. * @param axis the axis along which to repeat the value - * @return an expression which as the same shape as \ref e, except along the given \ref axis + * @return an expression with the same shape as ``e``, except along the given ``axis`` */ template inline auto repeat(E&& e, std::size_t repeats, std::size_t axis) @@ -1119,7 +1119,7 @@ namespace xt * The size of @p repeats must match the shape of the given @p axis. * @param axis the axis along which to repeat the value * - * @return an expression which as the same shape as \ref e, except along the given \ref axis + * @return an expression with the same shape as ``e``, except along the given ``axis`` */ template inline auto repeat(E&& e, const std::vector& repeats, std::size_t axis) @@ -1135,7 +1135,7 @@ namespace xt * @param repeats The number of repetition of each elements. * The size of @p repeats must match the shape of the given @p axis. * @param axis the axis along which to repeat the value - * @return an expression which as the same shape as \ref e, except along the given \ref axis + * @return an expression with the same shape as ``e``, except along the given ``axis`` */ template inline auto repeat(E&& e, std::vector&& repeats, std::size_t axis) diff --git a/include/xtensor/misc/xset_operation.hpp b/include/xtensor/misc/xset_operation.hpp index 94b7e23a7..35c564a37 100644 --- a/include/xtensor/misc/xset_operation.hpp +++ b/include/xtensor/misc/xset_operation.hpp @@ -25,6 +25,11 @@ namespace xt { + /** + * @defgroup searchsorted Searchsorted helpers + * @brief Helpers for locating insertion indices in sorted arrays. + */ + namespace detail { diff --git a/include/xtensor/misc/xsort.hpp b/include/xtensor/misc/xsort.hpp index aa9ea4cfa..196ec45cd 100644 --- a/include/xtensor/misc/xsort.hpp +++ b/include/xtensor/misc/xsort.hpp @@ -556,7 +556,7 @@ namespace xt * @ingroup xt_xsort * @param e input xexpression * @param kth_container a container of ``indices`` that should contain the correctly sorted value - * @param axis either integer (default = -1) to sort along last axis or ``xnone()`` to flatten before + * @param ax placeholder indicating that the input is flattened before sorting * sorting * * @return partially sorted xcontainer @@ -647,7 +647,7 @@ namespace xt * @ingroup xt_xsort * @param e input xexpression * @param kth_container a container of ``indices`` that should contain the correctly sorted value - * @param axis either integer (default = -1) to sort along last axis or ``xnone()`` to flatten before + * @param axis placeholder indicating that the input is flattened before sorting * sorting * * @return xcontainer with indices of partial sort of input diff --git a/include/xtensor/optional/xoptional_assembly_base.hpp b/include/xtensor/optional/xoptional_assembly_base.hpp index 3f60cc359..5df618f0b 100644 --- a/include/xtensor/optional/xoptional_assembly_base.hpp +++ b/include/xtensor/optional/xoptional_assembly_base.hpp @@ -700,7 +700,7 @@ namespace xt /** * Returns a reference to the element at the specified position * of the underlying storage in the optional assembly. - * @param index index to underlying flat storage. + * @param i index to underlying flat storage. */ template inline auto xoptional_assembly_base::flat(size_type i) -> reference @@ -711,7 +711,7 @@ namespace xt /** * Returns a constant reference to the element at the specified position * of the underlying storage in the optional assembly. - * @param index index to underlying flat storage. + * @param i index to underlying flat storage. */ template inline auto xoptional_assembly_base::flat(size_type i) const -> const_reference diff --git a/include/xtensor/reducers/xreducer.hpp b/include/xtensor/reducers/xreducer.hpp index 3cf8ec76f..0e5ef9992 100644 --- a/include/xtensor/reducers/xreducer.hpp +++ b/include/xtensor/reducers/xreducer.hpp @@ -1400,6 +1400,7 @@ namespace xt * @param func the function to apply * @param e the expression to reduce * @param axes the axes along which the reduction is performed + * @param options reducer options controlling evaluation strategy and related settings */ template template diff --git a/include/xtensor/views/xaxis_iterator.hpp b/include/xtensor/views/xaxis_iterator.hpp index 41da6822f..2b54748d4 100644 --- a/include/xtensor/views/xaxis_iterator.hpp +++ b/include/xtensor/views/xaxis_iterator.hpp @@ -235,7 +235,7 @@ namespace xt /** * Checks equality of the xaxis_slice_iterator and \c rhs. * - * @param + * @param rhs iterator to compare with * @return true if the iterators are equivalent, false otherwise */ template diff --git a/include/xtensor/views/xfunctor_view.hpp b/include/xtensor/views/xfunctor_view.hpp index 9f2daf712..1c76a91b5 100644 --- a/include/xtensor/views/xfunctor_view.hpp +++ b/include/xtensor/views/xfunctor_view.hpp @@ -29,7 +29,7 @@ namespace xt { /** - * @defgroup xt_xfunctor_view + * @defgroup xt_xfunctor_view Functor view * * Chunked array container. * Defined in ``xtensor/xfunctor_view.hpp`` diff --git a/include/xtensor/views/xindex_view.hpp b/include/xtensor/views/xindex_view.hpp index 8b911afb8..e41add4cb 100644 --- a/include/xtensor/views/xindex_view.hpp +++ b/include/xtensor/views/xindex_view.hpp @@ -505,7 +505,8 @@ namespace xt /** * Returns a reference to the element at the specified position in the xindex_view. * @param first iterator starting the sequence of indices - * The number of indices in the sequence should be equal to or greater 1. + * @param last iterator ending the sequence of indices (not used, only for compatibility with xexpression + * operator()) The number of indices in the sequence should be equal to or greater 1. */ template template @@ -517,7 +518,8 @@ namespace xt /** * Returns a reference to the element at the specified position in the xindex_view. * @param first iterator starting the sequence of indices - * The number of indices in the sequence should be equal to or greater 1. + * @param last iterator ending the sequence of indices (not used, only for compatibility with xexpression + * operator()) The number of indices in the sequence should be equal to or greater 1. */ template template