@@ -39,29 +39,27 @@ The results of the element-wise operation must be stored in an array having a sh
39
39
40
40
#. Repeat, while ``i >= 0 ``
41
41
42
- #. Let ``n1 `` be ``N1 - N + i ``.
42
+ #. Let ``n1 `` be ``N1 - N + i ``.
43
43
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 ``.
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 ``.
45
45
46
- #. Let ``n2 `` be ``N2 - N + i ``.
46
+ #. Let ``n2 `` be ``N2 - N + i ``.
47
47
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 ``.
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 ``.
49
49
50
- #. If ``d1 == 1 ``, then
50
+ #. If ``d1 == 1 ``, then set the `` i `` \t h element of `` shape `` to `` d2 ``.
51
51
52
- - set the `` i `` \t h element of ``shape `` to `` d2 ``.
52
+ #. Else, if ``d2 == 1 ``, then
53
53
54
- #. Else, if `` d2 == 1 ``, then
54
+ - set the `` i `` \t h element of `` shape `` to `` d1 ``.
55
55
56
- - set the `` i `` \t h element of ``shape `` to `` d1 ``.
56
+ #. Else, if ``d1 == d2 ``, then
57
57
58
- #. Else, if `` d1 == d2 ``, then
58
+ - set the `` i `` \t h element of `` shape `` to `` d1 ``.
59
59
60
- - set the `` i `` \t h element of `` shape `` to `` d1 `` .
60
+ #. Else, throw an exception .
61
61
62
- #. Else, throw an exception.
63
-
64
- #. Set ``i `` to ``i-1 ``.
62
+ #. Set ``i `` to ``i-1 ``.
65
63
66
64
#. Let ``tuple(shape) `` be the shape of the result array.
67
65
0 commit comments