Clamps every element of x to the range [min_val, max_val],
i.e. max(min_val, min(x, max_val)).
Value
arrayish
Has the same data type and shape as x.
It is ambiguous if the input is ambiguous.
StableHLO
Lowers to hlo_clamp().
Clamps every element of x to the range [min_val, max_val],
i.e. max(min_val, min(x, max_val)).
arrayish
Has the same data type and shape as x.
It is ambiguous if the input is ambiguous.
Lowers to hlo_clamp().