Skip to content

Commit c014045

Browse files
asmeurerkgryte
andauthored
Apply suggestions from code review
Co-authored-by: Athan <[email protected]>
1 parent 4636659 commit c014045

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

src/array_api_stubs/_draft/array_object.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ def __eq__(self: array, other: Union[int, float, bool, array], /) -> array:
515515
Element-wise results, including special cases, must equal the results returned by the equivalent element-wise function :func:`~array_api.equal`.
516516
517517
.. note::
518-
Comparisons of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
518+
Comparison of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
519519
"""
520520

521521
def __float__(self: array, /) -> float:
@@ -604,7 +604,7 @@ def __ge__(self: array, other: Union[int, float, array], /) -> array:
604604
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~array_api.greater_equal`.
605605
606606
.. note::
607-
Comparisons of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
607+
Comparison of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
608608
"""
609609

610610
def __getitem__(
@@ -659,7 +659,7 @@ def __gt__(self: array, other: Union[int, float, array], /) -> array:
659659
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~array_api.greater`.
660660
661661
.. note::
662-
Comparisons of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
662+
Comparison of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
663663
"""
664664

665665
def __index__(self: array, /) -> int:
@@ -757,9 +757,6 @@ def __invert__(self: array, /) -> array:
757757
758758
.. note::
759759
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~array_api.bitwise_invert`.
760-
761-
.. note::
762-
Comparisons of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
763760
"""
764761

765762
def __le__(self: array, other: Union[int, float, array], /) -> array:
@@ -786,7 +783,7 @@ def __le__(self: array, other: Union[int, float, array], /) -> array:
786783
Element-wise results must equal the results returned by the equivalent element-wise function :func:`~array_api.less_equal`.
787784
788785
.. note::
789-
Comparisons of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
786+
Comparison of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
790787
"""
791788

792789
def __lshift__(self: array, other: Union[int, array], /) -> array:
@@ -959,7 +956,7 @@ def __ne__(self: array, other: Union[int, float, bool, array], /) -> array:
959956
Element-wise results, including special cases, must equal the results returned by the equivalent element-wise function :func:`~array_api.not_equal`.
960957
961958
.. note::
962-
Comparisons of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
959+
Comparison of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
963960
964961
.. versionchanged:: 2022.12
965962
Added complex data type support.

src/array_api_stubs/_draft/elementwise_functions.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ def equal(x1: array, x2: array, /) -> array:
11191119
For discussion of complex number equality, see :ref:`complex-numbers`.
11201120
11211121
.. note::
1122-
Comparisons of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
1122+
Comparison of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
11231123
11241124
.. versionchanged:: 2022.12
11251125
Added complex data type support.
@@ -1352,7 +1352,7 @@ def greater(x1: array, x2: array, /) -> array:
13521352
an array containing the element-wise results. The returned array must have a data type of ``bool``.
13531353
13541354
.. note::
1355-
Comparisons of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
1355+
Comparison of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
13561356
13571357
"""
13581358

@@ -1377,7 +1377,7 @@ def greater_equal(x1: array, x2: array, /) -> array:
13771377
an array containing the element-wise results. The returned array must have a data type of ``bool``.
13781378
13791379
.. note::
1380-
Comparisons of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
1380+
Comparison of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
13811381
"""
13821382

13831383

@@ -1575,7 +1575,7 @@ def less(x1: array, x2: array, /) -> array:
15751575
an array containing the element-wise results. The returned array must have a data type of ``bool``.
15761576
15771577
.. note::
1578-
Comparisons of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
1578+
Comparison of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
15791579
"""
15801580

15811581

@@ -1599,7 +1599,7 @@ def less_equal(x1: array, x2: array, /) -> array:
15991599
an array containing the element-wise results. The returned array must have a data type of ``bool``.
16001600
16011601
.. note::
1602-
Comparisons of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
1602+
Comparison of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
16031603
"""
16041604

16051605

@@ -2151,7 +2151,7 @@ def not_equal(x1: array, x2: array, /) -> array:
21512151
For discussion of complex number equality, see :ref:`complex-numbers`.
21522152
21532153
.. note::
2154-
Comparisons of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
2154+
Comparison of arrays without a corresponding promotable data type (see :ref:`type-promotion`) is undefined and thus implementation-dependent.
21552155
21562156
.. versionchanged:: 2022.12
21572157
Added complex data type support.

0 commit comments

Comments
 (0)