Skip to content

Commit 6ccf3d8

Browse files
committed
Add notes concerning complex number support to min and max
1 parent 4057a88 commit 6ccf3d8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spec/API_specification/array_api/statistical_functions.py

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ def max(x: array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = None, keep
77
.. note::
88
When the number of elements over which to compute the maximum value is zero, the maximum value is implementation-defined. Specification-compliant libraries may choose to raise an error, return a sentinel value (e.g., if ``x`` is a floating-point input array, return ``NaN``), or return the minimum possible value for the input array ``x`` data type (e.g., if ``x`` is a floating-point array, return ``-infinity``).
99
10+
.. note::
11+
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`).
12+
1013
**Special Cases**
1114
1215
For floating-point operands,
@@ -64,6 +67,9 @@ def min(x: array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = None, keep
6467
.. note::
6568
When the number of elements over which to compute the minimum value is zero, the minimum value is implementation-defined. Specification-compliant libraries may choose to raise an error, return a sentinel value (e.g., if ``x`` is a floating-point input array, return ``NaN``), or return the maximum possible value for the input array ``x`` data type (e.g., if ``x`` is a floating-point array, return ``+infinity``).
6669
70+
.. note::
71+
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`).
72+
6773
**Special Cases**
6874
6975
For floating-point operands,

0 commit comments

Comments
 (0)