Element-wise clamp: max(min_val, min(operand, max_val)).
Converts min_val and max_val to the data type of operand.
Value
arrayish
Has the same shape and data type as the input.
Details
The underlying stableHLO function already broadcasts scalars, so no need to broadcast manually.
See also
prim_clamp() for the underlying primitive.