mindspore.ops.Erfc
- class mindspore.ops.Erfc[source]
Computes the complementary error function of x element-wise.
\[erfc(x) = 1 - \frac{2} {\sqrt{\pi}} \int\limits_0^{x} e^{-t^{2}} dt\]- Inputs:
x (Tensor) - The input tensor. The data type must be float16 or float32. \((N,*)\) where \(*\) means, any number of additional dimensions, its rank should less than 8.
- Outputs:
Tensor, has the same shap dtype as the x.
- Raises
TypeError – If dtype of x is neither float16 nor float32.
- Supported Platforms:
Ascend
GPU
Examples
>>> x = Tensor(np.array([-1, 0, 1, 2, 3]), mindspore.float32) >>> erfc = ops.Erfc() >>> output = erfc(x) >>> print(output) [1.8427168e+00 1.0000000e+00 1.5728319e-01 4.6912432e-03 2.2351742e-05]