Script.clip¶
- Script.clip(x, min, max, *, out=None)¶
Clip element values to the range [min, max].
- Parameters:
x (RegisterTensor) – Input tensor.
min (Expr | int | float) – Lower bound. Values below this are set to
min.max (Expr | int | float) – Upper bound. Values above this are set to
max.out (RegisterTensor, optional) – Output tensor. If not provided, a new tensor is allocated.
- Returns:
ret – Tensor with the same shape and dtype as
x.- Return type:
Notes
Thread group: Can be executed by any sized thread group.