Skip to content

Commit 9975597

Browse files
committed
Update documentation for index-related functions and operators, and clarify overload families for xjson, xreducer, and xset_operation
1 parent 7c9e046 commit 9975597

5 files changed

Lines changed: 33 additions & 84 deletions

File tree

docs/source/api/index_related.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ Index related functions
99

1010
Defined in ``xtensor/core/xoperation.hpp``
1111

12-
.. doxygenfunction:: where(const T&)
12+
The logical operator group documents the index-producing overloads of
13+
``xt::where``, ``xt::nonzero`` and ``xt::argwhere``.
1314

14-
.. doxygenfunction:: nonzero(const T&)
15-
16-
.. doxygenfunction:: argwhere
17-
18-
.. doxygenfunction:: from_indices
15+
``xt::from_indices`` is documented on the ``xtensor`` API page.

docs/source/api/operators.rst

Lines changed: 10 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -9,68 +9,17 @@ Operators and related functions
99

1010
Defined in ``xtensor/core/xmath.hpp`` and ``xtensor/core/xoperation.hpp``
1111

12-
.. doxygenfunction:: operator+(E&&)
12+
.. doxygengroup:: arithmetic_operators
13+
:members:
1314

14-
.. doxygenfunction:: operator-(E&&)
15+
.. doxygengroup:: logical_operators
16+
:members:
1517

16-
.. doxygenfunction:: operator+(E1&&, E2&&)
18+
.. doxygengroup:: comparison_operators
19+
:members:
1720

18-
.. doxygenfunction:: operator-(E1&&, E2&&)
21+
.. doxygengroup:: bitwise_operators
22+
:members:
1923

20-
.. doxygenfunction:: operator*(E1&&, E2&&)
21-
22-
.. doxygenfunction:: operator/(E1&&, E2&&)
23-
24-
.. doxygenfunction:: operator||(E1&&, E2&&)
25-
26-
.. doxygenfunction:: operator&&(E1&&, E2&&)
27-
28-
.. doxygenfunction:: operator!(E&&)
29-
30-
.. doxygenfunction:: where(E1&&, E2&&, E3&&)
31-
32-
.. doxygenfunction:: any(E&&)
33-
34-
.. doxygenfunction:: all(E&&)
35-
36-
.. doxygenfunction:: operator<(E1&&, E2&&)
37-
38-
.. doxygenfunction:: operator<=(E1&&, E2&&)
39-
40-
.. doxygenfunction:: operator>(E1&&, E2&&)
41-
42-
.. doxygenfunction:: operator>=(E1&&, E2&&)
43-
44-
.. doxygenfunction:: operator==(const xexpression<E1>&, const xexpression<E2>&)
45-
46-
.. doxygenfunction:: operator!=(const xexpression<E1>&, const xexpression<E2>&)
47-
48-
.. doxygenfunction:: equal(E1&&, E2&&)
49-
50-
.. doxygenfunction:: not_equal(E1&&, E2&&)
51-
52-
.. doxygenfunction:: less(E1&& e1, E2&& e2)
53-
54-
.. doxygenfunction:: less_equal(E1&& e1, E2&& e2)
55-
56-
.. doxygenfunction:: greater(E1&& e1, E2&& e2)
57-
58-
.. doxygenfunction:: greater_equal(E1&& e1, E2&& e2)
59-
60-
.. doxygenfunction:: operator&(E1&&, E2&&)
61-
62-
.. doxygenfunction:: operator|(E1&&, E2&&)
63-
64-
.. doxygenfunction:: operator^(E1&&, E2&&)
65-
66-
.. doxygenfunction:: operator~(E&&)
67-
68-
.. doxygenfunction:: left_shift(E1&&, E2&&)
69-
70-
.. doxygenfunction:: right_shift(E1&&, E2&&)
71-
72-
.. doxygenfunction:: operator<<(E1&&, E2&&)
73-
74-
.. doxygenfunction:: operator>>(E1&&, E2&&)
75-
76-
.. doxygenfunction:: cast(E&&)
24+
.. doxygengroup:: casting_operators
25+
:members:

docs/source/api/xjson.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ xjson: serialize to/from JSON
99

1010
Defined in ``xtensor/io/xjson.hpp``
1111

12-
.. doxygenfunction:: xt::to_json(nlohmann::json&, const E&);
12+
Available overload families
13+
---------------------------
1314

14-
.. doxygenfunction:: xt::from_json(const nlohmann::json&, E&);
15+
- ``xt::to_json(nlohmann::basic_json<M>&, const E&)``
16+
- ``xt::from_json(const nlohmann::basic_json<M>&, E&)``
17+
18+
``xt::from_json`` is provided for both container and view semantics.

docs/source/api/xreducer.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,9 @@ Defined in ``xtensor/reducers/xreducer.hpp``
1212
.. doxygenclass:: xt::xreducer
1313
:members:
1414

15-
.. doxygenfunction:: xt::reduce(F&&, E&&, X&&, EVS&&)
15+
Available overload families
16+
---------------------------
17+
18+
- ``xt::reduce(f, e, axes, options)``
19+
- ``xt::reduce(f, e, options)``
20+
- ``xt::reduce(f, e, const I (&axes)[N], options)``

docs/source/api/xset_operation.rst

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,13 @@ xset_operation
99

1010
Defined in ``xtensor/misc/xset_operation.hpp``
1111

12-
.. doxygenenum:: xt::isin(E&&, F&&)
12+
``xt::searchsorted(a, v, right)`` returns insertion indices for values ``v``
13+
in the sorted array ``a``.
1314

14-
.. doxygenenum:: xt::in1d(E&&, F&&)
15+
Available functions
16+
-------------------
1517

16-
.. doxygenenum:: xt::searchsorted(E1&&, E2&&, bool)
17-
18-
Further overloads
19-
-----------------
20-
21-
.. doxygenenum:: xt::isin(E&&, std::initializer_list<T>)
22-
23-
.. doxygenenum:: xt::isin(E&&, I&&, I&&)
24-
25-
.. doxygenenum:: xt::in1d(E&&, std::initializer_list<T>)
26-
27-
.. doxygenenum:: xt::in1d(E&&, I&&, I&&)
18+
- ``xt::isin(element, test_elements)``
19+
- ``xt::in1d(element, test_elements)``
20+
- ``xt::isin(element, begin, end)``
21+
- ``xt::in1d(element, begin, end)``

0 commit comments

Comments
 (0)