mindspore.ops.erfinv

mindspore.ops.erfinv(input)[source]

Returns the result of the inverse error function with input, which is defined in the range (-1, 1) as:

\[erfinv(erf(x)) = x\]

where \(x\) is the input.

Parameters

input (Tensor) – The input tensor to compute to, with data type float32, float16 or float64.

Returns

Tensor, has the same shape and dtype as input.

Raises

TypeError – If dtype of input is not float16, float32 or float64.

Supported Platforms:

Ascend GPU CPU

Examples

>>> x = Tensor(np.array([0, 0.5, -0.9]), mindspore.float32)
>>> output = ops.erfinv(x)
>>> print(output)
[ 0.          0.47695306 -1.1630805 ]