Skip to content

Commit 7ee81a5

Browse files
authored
Clarify expected behavior when providing a complex number array to all and any (#442)
1 parent 5ba86db commit 7ee81a5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spec/API_specification/array_api/utility_functions.py

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ def all(x: array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = None, keep
77
.. note::
88
Positive infinity, negative infinity, and NaN must evaluate to ``True``.
99
10+
.. note::
11+
If ``x`` has a complex floating-point data type, elements having a non-zero component (real or imaginary) must evaluate to ``True``.
12+
1013
.. note::
1114
If ``x`` is an empty array or the size of the axis (dimension) along which to evaluate elements is zero, the test result must be ``True``.
1215
@@ -32,6 +35,9 @@ def any(x: array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = None, keep
3235
.. note::
3336
Positive infinity, negative infinity, and NaN must evaluate to ``True``.
3437
38+
.. note::
39+
If ``x`` has a complex floating-point data type, elements having a non-zero component (real or imaginary) must evaluate to ``True``.
40+
3541
.. note::
3642
If ``x`` is an empty array or the size of the axis (dimension) along which to evaluate elements is zero, the test result must be ``False``.
3743

0 commit comments

Comments
 (0)