Skip to content

Commit 26bbc05

Browse files
committed
docs: clarify three-way broadcast and backport
1 parent cf3131d commit 26bbc05

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/array_api_stubs/_2023_12/elementwise_functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -791,9 +791,9 @@ def clip(
791791
x: array
792792
input array. Should have a real-valued data type.
793793
min: Optional[Union[int, float, array]]
794-
lower-bound of the range to which to clamp. If ``None``, no lower bound must be applied. Must be compatible with ``x1`` (see :ref:`broadcasting`). Should have a real-valued data type. Default: ``None``.
794+
lower-bound of the range to which to clamp. If ``None``, no lower bound must be applied. Must be compatible with ``x`` and ``max`` (see :ref:`broadcasting`). Should have a real-valued data type. Default: ``None``.
795795
max: Optional[Union[int, float, array]]
796-
upper-bound of the range to which to clamp. If ``None``, no upper bound must be applied. Must be compatible with ``x1`` (see :ref:`broadcasting`). Should have a real-valued data type. Default: ``None``.
796+
upper-bound of the range to which to clamp. If ``None``, no upper bound must be applied. Must be compatible with ``x`` and ``min`` (see :ref:`broadcasting`). Should have a real-valued data type. Default: ``None``.
797797
798798
Returns
799799
-------

src/array_api_stubs/_draft/elementwise_functions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,9 +824,9 @@ def clip(
824824
x: array
825825
input array. Should have a real-valued data type.
826826
min: Optional[Union[int, float, array]]
827-
lower-bound of the range to which to clamp. If ``None``, no lower bound must be applied. Must be compatible with ``x`` (see :ref:`broadcasting`). Should have the same data type as ``x``. Default: ``None``.
827+
lower-bound of the range to which to clamp. If ``None``, no lower bound must be applied. Must be compatible with ``x`` and ``max`` (see :ref:`broadcasting`). Should have the same data type as ``x``. Default: ``None``.
828828
max: Optional[Union[int, float, array]]
829-
upper-bound of the range to which to clamp. If ``None``, no upper bound must be applied. Must be compatible with ``x`` (see :ref:`broadcasting`). Should have the same data type as ``x``. Default: ``None``.
829+
upper-bound of the range to which to clamp. If ``None``, no upper bound must be applied. Must be compatible with ``x`` and ``min`` (see :ref:`broadcasting`). Should have the same data type as ``x``. Default: ``None``.
830830
831831
Returns
832832
-------

0 commit comments

Comments
 (0)