Skip to content

Commit dfeef13

Browse files
committed
docs: update language
1 parent 65cf9c7 commit dfeef13

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/array_api_stubs/_draft/set_functions.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ def unique_all(x: array, /) -> Tuple[array, array, array, array]:
3131
Notes
3232
-----
3333
34-
- The order of unique elements returned by this function is left unspecified and thus implementation-dependent. As a consequence, element order **may** vary between implementations.
34+
- The order of unique elements returned by this function is unspecified and thus implementation-defined. As a consequence, element order **may** vary between implementations.
3535
3636
- Uniqueness **should** be determined based on value equality (see :func:`~array_api.equal`). For input arrays having floating-point data types, value-based equality implies the following behavior.
3737
3838
- As ``nan`` values compare as ``False``, ``nan`` values **should** be considered distinct.
3939
- As complex floating-point values having at least one ``nan`` component compare as ``False``, complex floating-point values having ``nan`` components **should** be considered distinct.
40-
- As ``-0`` and ``+0`` compare as ``True``, signed zeros **should not** be considered distinct, and the corresponding unique element **may** be implementation-dependent (e.g., an implementation **may** choose to return ``-0`` if ``-0`` occurs before ``+0``).
40+
- As ``-0`` and ``+0`` compare as ``True``, signed zeros **should not** be considered distinct, and the corresponding unique element **may** be implementation-defined (e.g., an implementation **may** choose to return ``-0`` if ``-0`` occurs before ``+0``).
4141
4242
As signed zeros are not distinct, using ``inverse_indices`` to reconstruct the input array is not guaranteed to return an array having the exact same values.
4343
@@ -76,13 +76,13 @@ def unique_counts(x: array, /) -> Tuple[array, array]:
7676
Notes
7777
-----
7878
79-
- The order of unique elements returned by this function is left unspecified and thus implementation-dependent. As a consequence, element order **may** vary between implementations.
79+
- The order of unique elements returned by this function is unspecified and thus implementation-defined. As a consequence, element order **may** vary between implementations.
8080
8181
- Uniqueness **should** be determined based on value equality (see :func:`~array_api.equal`). For input arrays having floating-point data types, value-based equality implies the following behavior.
8282
8383
- As ``nan`` values compare as ``False``, ``nan`` values **should** be considered distinct.
8484
- As complex floating-point values having at least one ``nan`` component compare as ``False``, complex floating-point values having ``nan`` components **should** be considered distinct.
85-
- As ``-0`` and ``+0`` compare as ``True``, signed zeros **should not** be considered distinct, and the corresponding unique element **may** be implementation-dependent (e.g., an implementation **may** choose to return ``-0`` if ``-0`` occurs before ``+0``).
85+
- As ``-0`` and ``+0`` compare as ``True``, signed zeros **should not** be considered distinct, and the corresponding unique element **may** be implementation-defined (e.g., an implementation **may** choose to return ``-0`` if ``-0`` occurs before ``+0``).
8686
8787
Each ``nan`` value and each complex floating-point value having a ``nan`` component **should** have a count of one, while the counts for signed zeros **should** be aggregated as a single count.
8888
@@ -119,13 +119,13 @@ def unique_inverse(x: array, /) -> Tuple[array, array]:
119119
Notes
120120
-----
121121
122-
- The order of unique elements returned by this function is left unspecified and thus implementation-dependent. As a consequence, element order **may** vary between implementations.
122+
- The order of unique elements returned by this function is unspecified and thus implementation-defined. As a consequence, element order **may** vary between implementations.
123123
124124
- Uniqueness **should** be determined based on value equality (see :func:`~array_api.equal`). For input arrays having floating-point data types, value-based equality implies the following behavior.
125125
126126
- As ``nan`` values compare as ``False``, ``nan`` values **should** be considered distinct.
127127
- As complex floating-point values having at least one ``nan`` component compare as ``False``, complex floating-point values having ``nan`` components **should** be considered distinct.
128-
- As ``-0`` and ``+0`` compare as ``True``, signed zeros **should not** be considered distinct, and the corresponding unique element **may** be implementation-dependent (e.g., an implementation **may** choose to return ``-0`` if ``-0`` occurs before ``+0``).
128+
- As ``-0`` and ``+0`` compare as ``True``, signed zeros **should not** be considered distinct, and the corresponding unique element **may** be implementation-defined (e.g., an implementation **may** choose to return ``-0`` if ``-0`` occurs before ``+0``).
129129
130130
As signed zeros are not distinct, using ``inverse_indices`` to reconstruct the input array is not guaranteed to return an array having the exact same values.
131131
@@ -159,13 +159,13 @@ def unique_values(x: array, /) -> array:
159159
Notes
160160
-----
161161
162-
- The order of unique elements returned by this function is left unspecified and thus implementation-dependent. As a consequence, element order **may** vary between implementations.
162+
- The order of unique elements returned by this function is unspecified and thus implementation-defined. As a consequence, element order **may** vary between implementations.
163163
164164
- Uniqueness **should** be determined based on value equality (see :func:`~array_api.equal`). For input arrays having floating-point data types, value-based equality implies the following behavior.
165165
166166
- As ``nan`` values compare as ``False``, ``nan`` values **should** be considered distinct.
167167
- As complex floating-point values having at least one ``nan`` component compare as ``False``, complex floating-point values having ``nan`` components **should** be considered distinct.
168-
- As ``-0`` and ``+0`` compare as ``True``, signed zeros **should not** be considered distinct, and the corresponding unique element **may** be implementation-dependent (e.g., an implementation **may** choose to return ``-0`` if ``-0`` occurs before ``+0``).
168+
- As ``-0`` and ``+0`` compare as ``True``, signed zeros **should not** be considered distinct, and the corresponding unique element **may** be implementation-defined (e.g., an implementation **may** choose to return ``-0`` if ``-0`` occurs before ``+0``).
169169
170170
.. versionchanged:: 2022.12
171171
Added complex data type support.

0 commit comments

Comments
 (0)