mindspore.ops.igammac
- mindspore.ops.igammac(input, other)[source]
Calculates upper regularized incomplete Gamma function.
If we define input as a and other as x, the upper regularized incomplete Gamma function is defined as:
\[Q(a, x) = Gamma(a, x) / Gamma(a) = 1 - P(a, x)\]where
\[Gamma(a, x) = int_{x}^{\infty} t^{a-1} exp(-t) dt\]is the upper incomplete Gama function.
Above \(P(a, x)\) is the lower regularized complete Gamma function.
Warning
This is an experimental prototype that is subject to change and/or deletion.
- Parameters
- Returns
Tensor, has the same dtype as input and other.
- Raises
TypeError – If input or other is not a Tensor.
TypeError – If dtype of input other and a is not float32 nor float64.
TypeError – If other has different dtype with input.
ValueError – If input could not be broadcast to a tensor with shape of other.
- Supported Platforms:
Ascend
CPU
GPU
Examples
>>> a = Tensor(np.array([2.0, 4.0, 6.0, 8.0]).astype(np.float32)) >>> x = Tensor(np.array([2.0, 3.0, 4.0, 5.0]).astype(np.float32)) >>> output = ops.igammac(a, x) >>> print (output) [0.40600586 0.6472318 0.7851304 0.8666283]