Skip to content

Commit fb6b576

Browse files
committed
Update note directives
1 parent e2517f6 commit fb6b576

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

spec/API_specification/signatures/linear_algebra_functions.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ def matmul(x1: array, x2: array, /) -> array:
55
"""
66
Computes the matrix product.
77
8+
.. note::
9+
The ``matmul`` function must implement the same semantics as the built-in ``@`` operator (see `PEP 465 <https://www.python.org/dev/peps/pep-0465>`_).
10+
811
Parameters
912
----------
1013
x1: array
@@ -25,9 +28,6 @@ def matmul(x1: array, x2: array, /) -> array:
2528
2629
The returned array must have a data type determined by :ref:`type-promotion`.
2730
28-
Notes
29-
-----
30-
- The ``matmul`` function must implement the same semantics as the built-in ``@`` operator (see `PEP 465 <https://www.python.org/dev/peps/pep-0465>`_).
3131
3232
**Raises**
3333
@@ -63,6 +63,10 @@ def tensordot(x1: array, x2: array, /, *, axes: Union[int, Tuple[Sequence[int],
6363
first input array. Should have a numeric data type.
6464
x2: array
6565
second input array. Must be compatible with ``x1`` for all non-contracted axes (see :ref:`broadcasting`). Should have a numeric data type.
66+
67+
.. note::
68+
Contracted axes (dimensions) must not be broadcasted.
69+
6670
axes: Union[int, Tuple[Sequence[int], Sequence[int]]]
6771
number of axes (dimensions) to contract or explicit sequences of axes (dimensions) for ``x1`` and ``x2``, respectively.
6872
@@ -78,10 +82,6 @@ def tensordot(x1: array, x2: array, /, *, axes: Union[int, Tuple[Sequence[int],
7882
-------
7983
out: array
8084
an array containing the tensor contraction whose shape consists of the non-contracted axes (dimensions) of the first array ``x1``, followed by the non-contracted axes (dimensions) of the second array ``x2``. The returned array must have a data type determined by :ref:`type-promotion`.
81-
82-
Notes
83-
-----
84-
- Contracted axes (dimensions) must not be broadcasted.
8585
"""
8686

8787
def vecdot(x1: array, x2: array, /, *, axis: int = -1) -> array:

0 commit comments

Comments
 (0)