Skip to content

Commit 9c95dfb

Browse files
committed
revert changes to spec/*
1 parent 93bf898 commit 9c95dfb

31 files changed

+158
-158
lines changed

spec/draft/API_specification/array_object.rst

+19-19
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ Array object
55

66
Array API specification for array object attributes and methods.
77

8-
A conforming implementation of the array API standard *must* provide and support an array object having the following attributes and methods.
8+
A conforming implementation of the array API standard must provide and support an array object having the following attributes and methods.
99

10-
Furthermore, a conforming implementation of the array API standard *must* support, at minimum, array objects of rank (i.e., number of dimensions) ``0``, ``1``, ``2``, ``3``, and ``4`` and *must* explicitly document their maximum supported rank ``N``.
10+
Furthermore, a conforming implementation of the array API standard must support, at minimum, array objects of rank (i.e., number of dimensions) ``0``, ``1``, ``2``, ``3``, and ``4`` and must explicitly document their maximum supported rank ``N``.
1111

1212
.. note::
13-
Conforming implementations *must* support zero-dimensional arrays.
13+
Conforming implementations must support zero-dimensional arrays.
1414

1515
Apart from array object attributes, such as ``ndim``, ``device``, and ``dtype``, all operations in this standard return arrays (or tuples of arrays), including those operations, such as ``mean``, ``var``, and ``std``, from which some common array libraries (e.g., NumPy) return scalar values.
1616

@@ -23,12 +23,12 @@ Furthermore, a conforming implementation of the array API standard *must* suppor
2323
Operators
2424
---------
2525

26-
A conforming implementation of the array API standard *must* provide and support an array object supporting the following Python operators.
26+
A conforming implementation of the array API standard must provide and support an array object supporting the following Python operators.
2727

2828
Arithmetic Operators
2929
~~~~~~~~~~~~~~~~~~~~
3030

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

3333
- ``+x``: :meth:`.array.__pos__`
3434

@@ -75,24 +75,24 @@ A conforming implementation of the array API standard *must* provide and support
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__>`_
7777

78-
Arithmetic operators *should* be defined for arrays having real-valued data types.
78+
Arithmetic operators should be defined for arrays having real-valued data types.
7979

8080
Array Operators
8181
~~~~~~~~~~~~~~~
8282

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

8585
- `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__>`_
8989

90-
The matmul ``@`` operator *should* be defined for arrays having real-valued data types.
90+
The matmul ``@`` operator should be defined for arrays having real-valued data types.
9191

9292
Bitwise Operators
9393
~~~~~~~~~~~~~~~~~
9494

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

9797
- `~x`: :meth:`.array.__invert__`
9898

@@ -126,12 +126,12 @@ A conforming implementation of the array API standard *must* provide and support
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__>`_
128128

129-
Bitwise operators *should* be defined for arrays having integer and boolean data types.
129+
Bitwise operators should be defined for arrays having integer and boolean data types.
130130

131131
Comparison Operators
132132
~~~~~~~~~~~~~~~~~~~~
133133

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

136136
- `x1 < x2`: :meth:`.array.__lt__`
137137

@@ -163,20 +163,20 @@ A conforming implementation of the array API standard *must* provide and support
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__>`_
165165

166-
:meth:`.array.__lt__`, :meth:`.array.__le__`, :meth:`.array.__gt__`, :meth:`.array.__ge__` are only defined for arrays having real-valued data types. Other comparison operators *should* be defined for arrays having any data type.
166+
:meth:`.array.__lt__`, :meth:`.array.__le__`, :meth:`.array.__gt__`, :meth:`.array.__ge__` are only defined for arrays having real-valued data types. Other comparison operators should be defined for arrays having any data type.
167167
For backward compatibility, conforming implementations may support complex numbers; however, inequality comparison of complex numbers is unspecified and thus implementation-dependent (see :ref:`complex-number-ordering`).
168168

169169
In-place Operators
170170
~~~~~~~~~~~~~~~~~~
171171

172-
A conforming implementation of the array API standard *must* provide and support an array object supporting the following in-place Python operators.
172+
A conforming implementation of the array API standard must provide and support an array object supporting the following in-place Python operators.
173173

174-
An in-place operation *must not* change the data type or shape of the in-place array as a result of :ref:`type-promotion` or :ref:`broadcasting`.
174+
An in-place operation must not change the data type or shape of the in-place array as a result of :ref:`type-promotion` or :ref:`broadcasting`.
175175

176-
An in-place operation *must* have the same behavior (including special cases) as its respective binary (i.e., two operand, non-assignment) operation. For example, after in-place addition ``x1 += x2``, the modified array ``x1`` *must* always equal the result of the equivalent binary arithmetic operation ``x1 = x1 + x2``.
176+
An in-place operation must have the same behavior (including special cases) as its respective binary (i.e., two operand, non-assignment) operation. For example, after in-place addition ``x1 += x2``, the modified array ``x1`` must always equal the result of the equivalent binary arithmetic operation ``x1 = x1 + x2``.
177177

178178
.. note::
179-
In-place operators *must* be supported as discussed in :ref:`copyview-mutability`.
179+
In-place operators must be supported as discussed in :ref:`copyview-mutability`.
180180

181181
Arithmetic Operators
182182
""""""""""""""""""""
@@ -206,12 +206,12 @@ Bitwise Operators
206206
Reflected Operators
207207
~~~~~~~~~~~~~~~~~~~
208208

209-
A conforming implementation of the array API standard *must* provide and support an array object supporting the following reflected operators.
209+
A conforming implementation of the array API standard must provide and support an array object supporting the following reflected operators.
210210

211-
The results of applying reflected operators *must* match their non-reflected equivalents.
211+
The results of applying reflected operators must match their non-reflected equivalents.
212212

213213
.. note::
214-
All operators for which ``array <op> scalar`` is implemented *must* have an equivalent reflected operator implementation.
214+
All operators for which ``array <op> scalar`` is implemented must have an equivalent reflected operator implementation.
215215

216216
Arithmetic Operators
217217
""""""""""""""""""""

spec/draft/API_specification/broadcasting.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Given an element-wise operation involving two compatible arrays, an array having
1919

2020
If two arrays are of unequal rank, the array having a lower rank is promoted to a higher rank by (virtually) prepending singleton dimensions until the number of dimensions matches that of the array having a higher rank.
2121

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

2424
#. Let ``A`` and ``B`` both be arrays.
2525

@@ -112,7 +112,7 @@ The following examples demonstrate array shapes which do **not** broadcast.
112112
In-place Semantics
113113
------------------
114114

115-
As implied by the broadcasting algorithm, in-place element-wise operations (including ``__setitem__``) *must not* change the shape of the in-place array as a result of broadcasting. Such operations should only be supported in the case where the right-hand operand can broadcast to the shape of the left-hand operand, after any indexing operations are performed.
115+
As implied by the broadcasting algorithm, in-place element-wise operations (including ``__setitem__``) must not change the shape of the in-place array as a result of broadcasting. Such operations should only be supported in the case where the right-hand operand can broadcast to the shape of the left-hand operand, after any indexing operations are performed.
116116

117117
For example:
118118

spec/draft/API_specification/constants.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Constants
33

44
Array API specification for constants.
55

6-
A conforming implementation of the array API standard *must* provide and support the following constants adhering to the following conventions.
6+
A conforming implementation of the array API standard must provide and support the following constants adhering to the following conventions.
77

8-
- Each constant *must* have a Python floating-point data type (i.e., ``float``) and be provided as a Python scalar value.
8+
- Each constant must have a Python floating-point data type (i.e., ``float``) and be provided as a Python scalar value.
99

1010
Objects in API
1111
--------------

spec/draft/API_specification/creation_functions.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Creation Functions
33

44
Array API specification for creating arrays.
55

6-
A conforming implementation of the array API standard *must* provide and support the following functions.
6+
A conforming implementation of the array API standard must provide and support the following functions.
77

88

99
Objects in API

spec/draft/API_specification/data_type_functions.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Data Type Functions
33

44
Array API specification for data type functions.
55

6-
A conforming implementation of the array API standard *must* provide and support the following data type functions.
6+
A conforming implementation of the array API standard must provide and support the following data type functions.
77

88

99
Objects in API

0 commit comments

Comments
 (0)