Skip to content

Commit ee1101d

Browse files
committed
Fix Raises sections which caused rendering issues
1 parent 50b6540 commit ee1101d

File tree

2 files changed

+16
-20
lines changed

2 files changed

+16
-20
lines changed

Diff for: src/array_api_stubs/_draft/linalg.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,6 @@ def cross(x1: array, x2: array, /, *, axis: int = -1) -> array:
7272
an array containing the cross products. The returned array must have a data type determined by :ref:`type-promotion`.
7373
7474
75-
Raises
76-
------
77-
78-
- if provided an invalid ``axis``.
79-
- if the size of the axis over which to compute the cross product is not equal to ``3``.
80-
- if the size of the axis over which to compute the cross product is not the same (before broadcasting) for both ``x1`` and ``x2``.
81-
8275
Notes
8376
-----
8477
@@ -87,6 +80,11 @@ def cross(x1: array, x2: array, /, *, axis: int = -1) -> array:
8780
8881
.. versionchanged:: 2022.12
8982
Added complex data type support.
83+
84+
**Raises**
85+
86+
- if the size of the axis over which to compute the cross product is not equal to ``3``.
87+
- if the size of the axis over which to compute the cross product is not the same (before broadcasting) for both ``x1`` and ``x2``.
9088
"""
9189

9290

Diff for: src/array_api_stubs/_draft/linear_algebra_functions.py

+11-13
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,20 @@ def matmul(x1: array, x2: array, /) -> array:
3232
3333
The returned array must have a data type determined by :ref:`type-promotion`.
3434
35-
Raises
36-
------
35+
Notes
36+
-----
37+
38+
.. versionchanged:: 2022.12
39+
Added complex data type support.
40+
41+
**Raises**
3742
3843
- if either ``x1`` or ``x2`` is a zero-dimensional array.
3944
- if ``x1`` is a one-dimensional array having shape ``(K,)``, ``x2`` is a one-dimensional array having shape ``(L,)``, and ``K != L``.
4045
- if ``x1`` is a one-dimensional array having shape ``(K,)``, ``x2`` is an array having shape ``(..., L, N)``, and ``K != L``.
4146
- if ``x1`` is an array having shape ``(..., M, K)``, ``x2`` is a one-dimensional array having shape ``(L,)``, and ``K != L``.
4247
- if ``x1`` is an array having shape ``(..., M, K)``, ``x2`` is an array having shape ``(..., L, N)``, and ``K != L``.
4348
44-
Notes
45-
-----
46-
47-
.. versionchanged:: 2022.12
48-
Added complex data type support.
4949
"""
5050

5151

@@ -145,17 +145,15 @@ def vecdot(x1: array, x2: array, /, *, axis: int = -1) -> array:
145145
out: array
146146
if ``x1`` and ``x2`` are both one-dimensional arrays, a zero-dimensional containing the dot product; otherwise, a non-zero-dimensional array containing the dot products and having rank ``N-1``, where ``N`` is the rank (number of dimensions) of the shape determined according to :ref:`broadcasting` along the non-contracted axes. The returned array must have a data type determined by :ref:`type-promotion`.
147147
148-
Raises
149-
------
150-
151-
- if provided an invalid ``axis``.
152-
- if the size of the axis over which to compute the dot product is not the same (before broadcasting) for both ``x1`` and ``x2``.
153-
154148
Notes
155149
-----
156150
157151
.. versionchanged:: 2022.12
158152
Added complex data type support.
153+
154+
**Raises**
155+
156+
- if the size of the axis over which to compute the dot product is not the same (before broadcasting) for both ``x1`` and ``x2``.
159157
"""
160158

161159

0 commit comments

Comments
 (0)