Skip to content

Commit 115b82c

Browse files
authored
Fix ordered lists
1 parent 13a0dd5 commit 115b82c

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

spec/API_specification/broadcasting.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,49 +21,49 @@ If two arrays are of unequal rank, the array having a lower rank is promoted to
2121

2222
The results of the element-wise operation must be stored in an array having a shape determined by the following algorithm.
2323

24-
1. Let ``A`` and ``B`` both be arrays.
24+
#. Let ``A`` and ``B`` both be arrays.
2525

26-
1. Let ``shape1`` be a tuple describing the shape of array ``A``.
26+
#. Let ``shape1`` be a tuple describing the shape of array ``A``.
2727

28-
1. Let ``shape2`` be a tuple describing the shape of array ``B``.
28+
#. Let ``shape2`` be a tuple describing the shape of array ``B``.
2929

30-
1. Let ``N1`` be the number of dimensions of array ``A`` (i.e., the result of ``len(shape1)``).
30+
#. Let ``N1`` be the number of dimensions of array ``A`` (i.e., the result of ``len(shape1)``).
3131

32-
1. Let ``N2`` be the number of dimensions of array ``B`` (i.e., the result of ``len(shape2)``).
32+
#. Let ``N2`` be the number of dimensions of array ``B`` (i.e., the result of ``len(shape2)``).
3333

34-
1. Let ``N`` be the maximum value of ``N1`` and ``N2`` (i.e., the result of ``max(N1, N2)``).
34+
#. Let ``N`` be the maximum value of ``N1`` and ``N2`` (i.e., the result of ``max(N1, N2)``).
3535

36-
1. Let ``shape`` be a temporary list of length ``N`` for storing the shape of the result array.
36+
#. Let ``shape`` be a temporary list of length ``N`` for storing the shape of the result array.
3737

38-
1. Let ``i`` be ``N-1``.
38+
#. Let ``i`` be ``N-1``.
3939

40-
1. Repeat, while ``i >= 0``
40+
#. Repeat, while ``i >= 0``
4141

42-
1. Let ``n1`` be ``N1 - N + i``.
42+
#. Let ``n1`` be ``N1 - N + i``.
4343

44-
1. If ``n1 >= 0``, let ``d1`` be the size of dimension ``n1`` for array ``A`` (i.e., the result of ``shape1[n1]``); else, let ``d1`` be ``1``.
44+
#. If ``n1 >= 0``, let ``d1`` be the size of dimension ``n1`` for array ``A`` (i.e., the result of ``shape1[n1]``); else, let ``d1`` be ``1``.
4545

46-
1. Let ``n2`` be ``N2 - N + i``.
46+
#. Let ``n2`` be ``N2 - N + i``.
4747

48-
1. If ``n2 >= 0``, let ``d2`` be the size of dimension ``n2`` for array ``B`` (i.e., the result of ``shape2[n2]``); else, let ``d2`` be ``1``.
48+
#. If ``n2 >= 0``, let ``d2`` be the size of dimension ``n2`` for array ``B`` (i.e., the result of ``shape2[n2]``); else, let ``d2`` be ``1``.
4949

50-
1. If ``d1 == 1``, then
50+
#. If ``d1 == 1``, then
5151

5252
- set the ``i``th element of ``shape`` to ``d2``.
5353

54-
1. Else, if ``d2 == 1``, then
54+
#. Else, if ``d2 == 1``, then
5555

5656
- set the ``i``th element of ``shape`` to ``d1``.
5757

58-
1. Else, if ``d1 == d2``, then
58+
#. Else, if ``d1 == d2``, then
5959

6060
- set the ``i``th element of ``shape`` to ``d1``.
6161

62-
1. Else, throw an exception.
62+
#. Else, throw an exception.
6363

64-
1. Set ``i`` to ``i-1``.
64+
#. Set ``i`` to ``i-1``.
6565

66-
1. Let ``tuple(shape)`` be the shape of the result array.
66+
#. Let ``tuple(shape)`` be the shape of the result array.
6767

6868
Examples
6969
~~~~~~~~
@@ -117,4 +117,4 @@ The following examples demonstrate array shapes which do **not** broadcast.
117117
In-place Semantics
118118
------------------
119119

120-
As implied by the broadcasting algorithm, in-place element-wise operations must not change the shape of the in-place array as a result of broadcasting.
120+
As implied by the broadcasting algorithm, in-place element-wise operations must not change the shape of the in-place array as a result of broadcasting.

0 commit comments

Comments
 (0)