mindspore.ops.Erfinv
- class mindspore.ops.Erfinv[source]
Computes the inverse error function of input. The inverse error function is defined in the range (-1, 1).
The formula is defined as:
\[erfinv(erf(x)) = x\]- Inputs:
input_x (Tensor) - The input tensor to compute to, with data type float32, float16 or float64.
- Outputs:
Tensor, has the same shape and dtype as input_x.
- Raises
TypeError – If dtype of input_x is not float16, float32 or float64.
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> x = Tensor(np.array([0, 0.5, -0.9]), mindspore.float32) >>> erfinv = ops.Erfinv() >>> output = erfinv(x) >>> print(output) [ 0. 0.47695306 -1.1630805 ]