From 7103b4b52214ae8f2e23981b74bf0365c1b25fb7 Mon Sep 17 00:00:00 2001 From: Hameer Abbasi Date: Tue, 23 Jan 2024 14:20:57 +0100 Subject: [PATCH 1/5] Fix wording for comparison operators. --- spec/2021.12/API_specification/array_object.rst | 2 +- spec/2022.12/API_specification/array_object.rst | 2 +- spec/draft/API_specification/array_object.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/2021.12/API_specification/array_object.rst b/spec/2021.12/API_specification/array_object.rst index 32b775b6a..6f409f1b8 100644 --- a/spec/2021.12/API_specification/array_object.rst +++ b/spec/2021.12/API_specification/array_object.rst @@ -170,7 +170,7 @@ A conforming implementation of the array API standard must provide and support a - `operator.ne(x1, x2) `_ - `operator.__ne__(x1, x2) `_ -Comparison operators should be defined for arrays having any data type. +: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. In-place Operators ~~~~~~~~~~~~~~~~~~ diff --git a/spec/2022.12/API_specification/array_object.rst b/spec/2022.12/API_specification/array_object.rst index b15bbdc43..85db8ee9e 100644 --- a/spec/2022.12/API_specification/array_object.rst +++ b/spec/2022.12/API_specification/array_object.rst @@ -163,7 +163,7 @@ A conforming implementation of the array API standard must provide and support a - `operator.ne(x1, x2) `_ - `operator.__ne__(x1, x2) `_ -Comparison operators should be defined for arrays having any data type. +: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. In-place Operators ~~~~~~~~~~~~~~~~~~ diff --git a/spec/draft/API_specification/array_object.rst b/spec/draft/API_specification/array_object.rst index 0fadf9fc5..249aaed22 100644 --- a/spec/draft/API_specification/array_object.rst +++ b/spec/draft/API_specification/array_object.rst @@ -163,7 +163,7 @@ A conforming implementation of the array API standard must provide and support a - `operator.ne(x1, x2) `_ - `operator.__ne__(x1, x2) `_ -Comparison operators should be defined for arrays having any data type. +: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. In-place Operators ~~~~~~~~~~~~~~~~~~ From c0f739210f755ec835f01ab59bdc97286a7c1943 Mon Sep 17 00:00:00 2001 From: Hameer Abbasi Date: Wed, 24 Jan 2024 07:16:50 +0100 Subject: [PATCH 2/5] Add wording to explain validity of definition of complex operators. --- spec/2021.12/API_specification/array_object.rst | 1 + spec/2022.12/API_specification/array_object.rst | 1 + spec/draft/API_specification/array_object.rst | 1 + 3 files changed, 3 insertions(+) diff --git a/spec/2021.12/API_specification/array_object.rst b/spec/2021.12/API_specification/array_object.rst index 6f409f1b8..c99dcf3da 100644 --- a/spec/2021.12/API_specification/array_object.rst +++ b/spec/2021.12/API_specification/array_object.rst @@ -171,6 +171,7 @@ A conforming implementation of the array API standard must provide and support a - `operator.__ne__(x1, x2) `_ :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. +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`). In-place Operators ~~~~~~~~~~~~~~~~~~ diff --git a/spec/2022.12/API_specification/array_object.rst b/spec/2022.12/API_specification/array_object.rst index 85db8ee9e..fbfbc6836 100644 --- a/spec/2022.12/API_specification/array_object.rst +++ b/spec/2022.12/API_specification/array_object.rst @@ -164,6 +164,7 @@ A conforming implementation of the array API standard must provide and support a - `operator.__ne__(x1, x2) `_ :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. +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`). In-place Operators ~~~~~~~~~~~~~~~~~~ diff --git a/spec/draft/API_specification/array_object.rst b/spec/draft/API_specification/array_object.rst index 249aaed22..d155f086e 100644 --- a/spec/draft/API_specification/array_object.rst +++ b/spec/draft/API_specification/array_object.rst @@ -164,6 +164,7 @@ A conforming implementation of the array API standard must provide and support a - `operator.__ne__(x1, x2) `_ :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. +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`). In-place Operators ~~~~~~~~~~~~~~~~~~ From ec7eb342baab5d389684a1150000ee090d960437 Mon Sep 17 00:00:00 2001 From: Hameer Abbasi Date: Wed, 24 Jan 2024 07:23:09 +0100 Subject: [PATCH 3/5] Remove ref from 2021.12 version due to missing reference. --- spec/2021.12/API_specification/array_object.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/2021.12/API_specification/array_object.rst b/spec/2021.12/API_specification/array_object.rst index c99dcf3da..61af87573 100644 --- a/spec/2021.12/API_specification/array_object.rst +++ b/spec/2021.12/API_specification/array_object.rst @@ -171,7 +171,7 @@ A conforming implementation of the array API standard must provide and support a - `operator.__ne__(x1, x2) `_ :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. -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`). +For backward compatibility, conforming implementations may support complex numbers; however, inequality comparison of complex numbers is unspecified and thus implementation-dependent. In-place Operators ~~~~~~~~~~~~~~~~~~ From 0b5e90d20d578db70809781c0bdb9ec5786783d4 Mon Sep 17 00:00:00 2001 From: Hameer Abbasi Date: Thu, 25 Jan 2024 13:32:43 +0100 Subject: [PATCH 4/5] Revert 2021.12. --- spec/2021.12/API_specification/array_object.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/2021.12/API_specification/array_object.rst b/spec/2021.12/API_specification/array_object.rst index 61af87573..32b775b6a 100644 --- a/spec/2021.12/API_specification/array_object.rst +++ b/spec/2021.12/API_specification/array_object.rst @@ -170,8 +170,7 @@ A conforming implementation of the array API standard must provide and support a - `operator.ne(x1, x2) `_ - `operator.__ne__(x1, x2) `_ -: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. -For backward compatibility, conforming implementations may support complex numbers; however, inequality comparison of complex numbers is unspecified and thus implementation-dependent. +Comparison operators should be defined for arrays having any data type. In-place Operators ~~~~~~~~~~~~~~~~~~ From f22a283b5777b501094cf1174c9866c132347739 Mon Sep 17 00:00:00 2001 From: Athan Date: Thu, 25 Jan 2024 04:36:23 -0800 Subject: [PATCH 5/5] Apply suggestions from code review --- spec/2022.12/API_specification/array_object.rst | 2 +- spec/draft/API_specification/array_object.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/2022.12/API_specification/array_object.rst b/spec/2022.12/API_specification/array_object.rst index fbfbc6836..45aec9b34 100644 --- a/spec/2022.12/API_specification/array_object.rst +++ b/spec/2022.12/API_specification/array_object.rst @@ -164,7 +164,7 @@ A conforming implementation of the array API standard must provide and support a - `operator.__ne__(x1, x2) `_ :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. -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`). +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`). In-place Operators ~~~~~~~~~~~~~~~~~~ diff --git a/spec/draft/API_specification/array_object.rst b/spec/draft/API_specification/array_object.rst index d155f086e..f8a586ade 100644 --- a/spec/draft/API_specification/array_object.rst +++ b/spec/draft/API_specification/array_object.rst @@ -164,7 +164,7 @@ A conforming implementation of the array API standard must provide and support a - `operator.__ne__(x1, x2) `_ :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. -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`). +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`). In-place Operators ~~~~~~~~~~~~~~~~~~