warp.clamp#
- warp.clamp(x: Scalar, low: Scalar, high: Scalar) Scalar#
Kernel
Differentiable
Clamp the value of
xto the range [low, high].Equivalent to
wp.min(wp.max(low, x), high). On float types this means NaN values ofxproducewp.min(low, high)rather than propagating NaN.