Skip to content

Commit 87d35df

Browse files
committed
Allow clip to have int min or max when x is floating-point
This is for consistency with operators, which allow combining an int with an array that has a floating-point data type. See the discussion at data-apis#807.
1 parent 25e7177 commit 87d35df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/array_api_stubs/_2023_12/elementwise_functions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ def clip(
805805
806806
- If both ``min`` and ``max`` are ``None``, the elements of the returned array must equal the respective elements in ``x``.
807807
- If a broadcasted element in ``min`` is greater than a corresponding broadcasted element in ``max``, behavior is unspecified and thus implementation-dependent.
808-
- If ``x`` and either ``min`` or ``max`` have different data type kinds (e.g., integer versus floating-point), behavior is unspecified and thus implementation-dependent.
808+
- If ``x`` has an integer data type and either ``min`` or ``max`` is floating-point, behavior is unspecified and thus implementation-dependent.
809809
810810
.. versionadded:: 2023.12
811811
"""

0 commit comments

Comments
 (0)