Skip to content

Commit 0b17bb6

Browse files
committed
try different docs target
Signed-off-by: nstarman <[email protected]>
1 parent e5d5f7e commit 0b17bb6

File tree

2 files changed

+65
-65
lines changed

2 files changed

+65
-65
lines changed

spec/draft/API_specification/array_object.rst

+63-63
Original file line numberDiff line numberDiff line change
@@ -30,47 +30,47 @@ Arithmetic Operators
3030

3131
A conforming implementation of the array API standard must provide and support an array object supporting the following Python arithmetic operators.
3232

33-
- ``+x``: :meth:`.array.__pos__`
33+
- ``+x``: :meth:`.Array.__pos__`
3434

3535
- `operator.pos(x) <https://docs.python.org/3/library/operator.html#operator.pos>`_
3636
- `operator.__pos__(x) <https://docs.python.org/3/library/operator.html#operator.__pos__>`_
3737

38-
- `-x`: :meth:`.array.__neg__`
38+
- `-x`: :meth:`.Array.__neg__`
3939

4040
- `operator.neg(x) <https://docs.python.org/3/library/operator.html#operator.neg>`_
4141
- `operator.__neg__(x) <https://docs.python.org/3/library/operator.html#operator.__neg__>`_
4242

43-
- `x1 + x2`: :meth:`.array.__add__`
43+
- `x1 + x2`: :meth:`.Array.__add__`
4444

4545
- `operator.add(x1, x2) <https://docs.python.org/3/library/operator.html#operator.add>`_
4646
- `operator.__add__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__add__>`_
4747

48-
- `x1 - x2`: :meth:`.array.__sub__`
48+
- `x1 - x2`: :meth:`.Array.__sub__`
4949

5050
- `operator.sub(x1, x2) <https://docs.python.org/3/library/operator.html#operator.sub>`_
5151
- `operator.__sub__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__sub__>`_
5252

53-
- `x1 * x2`: :meth:`.array.__mul__`
53+
- `x1 * x2`: :meth:`.Array.__mul__`
5454

5555
- `operator.mul(x1, x2) <https://docs.python.org/3/library/operator.html#operator.mul>`_
5656
- `operator.__mul__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__mul__>`_
5757

58-
- `x1 / x2`: :meth:`.array.__truediv__`
58+
- `x1 / x2`: :meth:`.Array.__truediv__`
5959

6060
- `operator.truediv(x1,x2) <https://docs.python.org/3/library/operator.html#operator.truediv>`_
6161
- `operator.__truediv__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__truediv__>`_
6262

63-
- `x1 // x2`: :meth:`.array.__floordiv__`
63+
- `x1 // x2`: :meth:`.Array.__floordiv__`
6464

6565
- `operator.floordiv(x1, x2) <https://docs.python.org/3/library/operator.html#operator.floordiv>`_
6666
- `operator.__floordiv__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__floordiv__>`_
6767

68-
- `x1 % x2`: :meth:`.array.__mod__`
68+
- `x1 % x2`: :meth:`.Array.__mod__`
6969

7070
- `operator.mod(x1, x2) <https://docs.python.org/3/library/operator.html#operator.mod>`_
7171
- `operator.__mod__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__mod__>`_
7272

73-
- `x1 ** x2`: :meth:`.array.__pow__`
73+
- `x1 ** x2`: :meth:`.Array.__pow__`
7474

7575
- `operator.pow(x1, x2) <https://docs.python.org/3/library/operator.html#operator.pow>`_
7676
- `operator.__pow__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__pow__>`_
@@ -82,7 +82,7 @@ Array Operators
8282

8383
A conforming implementation of the array API standard must provide and support an array object supporting the following Python array operators.
8484

85-
- `x1 @ x2`: :meth:`.array.__matmul__`
85+
- `x1 @ x2`: :meth:`.Array.__matmul__`
8686

8787
- `operator.matmul(x1, x2) <https://docs.python.org/3/library/operator.html#operator.matmul>`_
8888
- `operator.__matmul__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__matmul__>`_
@@ -94,34 +94,34 @@ Bitwise Operators
9494

9595
A conforming implementation of the array API standard must provide and support an array object supporting the following Python bitwise operators.
9696

97-
- `~x`: :meth:`.array.__invert__`
97+
- `~x`: :meth:`.Array.__invert__`
9898

9999
- `operator.inv(x) <https://docs.python.org/3/library/operator.html#operator.inv>`_
100100
- `operator.invert(x) <https://docs.python.org/3/library/operator.html#operator.invert>`_
101101
- `operator.__inv__(x) <https://docs.python.org/3/library/operator.html#operator.__inv__>`_
102102
- `operator.__invert__(x) <https://docs.python.org/3/library/operator.html#operator.__invert__>`_
103103

104-
- `x1 & x2`: :meth:`.array.__and__`
104+
- `x1 & x2`: :meth:`.Array.__and__`
105105

106106
- `operator.and(x1, x2) <https://docs.python.org/3/library/operator.html#operator.and>`_
107107
- `operator.__and__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__and__>`_
108108

109-
- `x1 | x2`: :meth:`.array.__or__`
109+
- `x1 | x2`: :meth:`.Array.__or__`
110110

111111
- `operator.or(x1, x2) <https://docs.python.org/3/library/operator.html#operator.or>`_
112112
- `operator.__or__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__or__>`_
113113

114-
- `x1 ^ x2`: :meth:`.array.__xor__`
114+
- `x1 ^ x2`: :meth:`.Array.__xor__`
115115

116116
- `operator.xor(x1, x2) <https://docs.python.org/3/library/operator.html#operator.xor>`_
117117
- `operator.__xor__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__xor__>`_
118118

119-
- `x1 << x2`: :meth:`.array.__lshift__`
119+
- `x1 << x2`: :meth:`.Array.__lshift__`
120120

121121
- `operator.lshift(x1, x2) <https://docs.python.org/3/library/operator.html#operator.lshift>`_
122122
- `operator.__lshift__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__lshift__>`_
123123

124-
- `x1 >> x2`: :meth:`.array.__rshift__`
124+
- `x1 >> x2`: :meth:`.Array.__rshift__`
125125

126126
- `operator.rshift(x1, x2) <https://docs.python.org/3/library/operator.html#operator.rshift>`_
127127
- `operator.__rshift__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__rshift__>`_
@@ -133,32 +133,32 @@ Comparison Operators
133133

134134
A conforming implementation of the array API standard must provide and support an array object supporting the following Python comparison operators.
135135

136-
- `x1 < x2`: :meth:`.array.__lt__`
136+
- `x1 < x2`: :meth:`.Array.__lt__`
137137

138138
- `operator.lt(x1, x2) <https://docs.python.org/3/library/operator.html#operator.lt>`_
139139
- `operator.__lt__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__lt__>`_
140140

141-
- `x1 <= x2`: :meth:`.array.__le__`
141+
- `x1 <= x2`: :meth:`.Array.__le__`
142142

143143
- `operator.le(x1, x2) <https://docs.python.org/3/library/operator.html#operator.le>`_
144144
- `operator.__le__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__le__>`_
145145

146-
- `x1 > x2`: :meth:`.array.__gt__`
146+
- `x1 > x2`: :meth:`.Array.__gt__`
147147

148148
- `operator.gt(x1, x2) <https://docs.python.org/3/library/operator.html#operator.gt>`_
149149
- `operator.__gt__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__gt__>`_
150150

151-
- `x1 >= x2`: :meth:`.array.__ge__`
151+
- `x1 >= x2`: :meth:`.Array.__ge__`
152152

153153
- `operator.ge(x1, x2) <https://docs.python.org/3/library/operator.html#operator.ge>`_
154154
- `operator.__ge__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__ge__>`_
155155

156-
- `x1 == x2`: :meth:`.array.__eq__`
156+
- `x1 == x2`: :meth:`.Array.__eq__`
157157

158158
- `operator.eq(x1, x2) <https://docs.python.org/3/library/operator.html#operator.eq>`_
159159
- `operator.__eq__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__eq__>`_
160160

161-
- `x1 != x2`: :meth:`.array.__ne__`
161+
- `x1 != x2`: :meth:`.Array.__ne__`
162162

163163
- `operator.ne(x1, x2) <https://docs.python.org/3/library/operator.html#operator.ne>`_
164164
- `operator.__ne__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__ne__>`_
@@ -251,13 +251,13 @@ Attributes
251251
:toctree: generated
252252
:template: property.rst
253253

254-
array.dtype
255-
array.device
256-
array.mT
257-
array.ndim
258-
array.shape
259-
array.size
260-
array.T
254+
Array.dtype
255+
Array.device
256+
Array.mT
257+
Array.ndim
258+
Array.shape
259+
Array.size
260+
Array.T
261261

262262
-------------------------------------------------
263263

@@ -271,37 +271,37 @@ Methods
271271
:toctree: generated
272272
:template: property.rst
273273

274-
array.__abs__
275-
array.__add__
276-
array.__and__
277-
array.__array_namespace__
278-
array.__bool__
279-
array.__complex__
280-
array.__dlpack__
281-
array.__dlpack_device__
282-
array.__eq__
283-
array.__float__
284-
array.__floordiv__
285-
array.__ge__
286-
array.__getitem__
287-
array.__gt__
288-
array.__index__
289-
array.__int__
290-
array.__invert__
291-
array.__le__
292-
array.__lshift__
293-
array.__lt__
294-
array.__matmul__
295-
array.__mod__
296-
array.__mul__
297-
array.__ne__
298-
array.__neg__
299-
array.__or__
300-
array.__pos__
301-
array.__pow__
302-
array.__rshift__
303-
array.__setitem__
304-
array.__sub__
305-
array.__truediv__
306-
array.__xor__
307-
array.to_device
274+
Array.__abs__
275+
Array.__add__
276+
Array.__and__
277+
Array.__array_namespace__
278+
Array.__bool__
279+
Array.__complex__
280+
Array.__dlpack__
281+
Array.__dlpack_device__
282+
Array.__eq__
283+
Array.__float__
284+
Array.__floordiv__
285+
Array.__ge__
286+
Array.__getitem__
287+
Array.__gt__
288+
Array.__index__
289+
Array.__int__
290+
Array.__invert__
291+
Array.__le__
292+
Array.__lshift__
293+
Array.__lt__
294+
Array.__matmul__
295+
Array.__mod__
296+
Array.__mul__
297+
Array.__ne__
298+
Array.__neg__
299+
Array.__or__
300+
Array.__pos__
301+
Array.__pow__
302+
Array.__rshift__
303+
Array.__setitem__
304+
Array.__sub__
305+
Array.__truediv__
306+
Array.__xor__
307+
Array.to_device

src/array_api_stubs/_draft/array_object.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from .data_types import DType
1414

1515
array = TypeVar("array", bound="Array")
16-
# NOTE: when working with py3.11+ this can be ``typing.array``.
16+
# NOTE: when working with py3.11+ this can be ``typing.Self``.
1717

1818

1919
class Array(Protocol):
@@ -996,7 +996,7 @@ def __sub__(self: array, other: int | float | array, /) -> array:
996996
"""
997997
Calculates the difference for each element of an array instance with the respective element of the array ``other``.
998998
999-
The result of ``self_i - other_i`` must be the same as ``self_i + (-other_i)`` and must be governed by the same floating-point rules as addition (see :meth:`array.__add__`).
999+
The result of ``self_i - other_i`` must be the same as ``self_i + (-other_i)`` and must be governed by the same floating-point rules as addition (see :meth:`Array.__add__`).
10001000
10011001
Parameters
10021002
----------

0 commit comments

Comments
 (0)