gammainc¶
- paddle. gammainc ( x, y, name=None ) [source]
-
Computes the regularized lower incomplete gamma function.
\[P(x, y) = \frac{1}{\Gamma(x)} \int_{0}^{y} t^{x-1} e^{-t} dt\]- Parameters
-
x (Tensor) – The non-negative argument Tensor. Must be one of the following types: float32, float64.
y (Tensor) – The positive parameter Tensor. Must be one of the following types: float32, float64.
name (str, optional) – Name for the operation (optional, default is None). For more information, please refer to Name.
- Returns
-
Tensor, the gammainc of the input Tensor.
Examples
>>> import paddle >>> x = paddle.to_tensor([0.5, 0.5, 0.5, 0.5, 0.5], dtype="float32") >>> y = paddle.to_tensor([0, 1, 10, 100, 1000], dtype="float32") >>> out = paddle.gammainc(x, y) >>> print(out) Tensor(shape=[5], dtype=float32, place=Place(cpu), stop_gradient=True, [0. , 0.84270084, 0.99999225, 1. , 1. ])