mindspore.Tensor.erf
- Tensor.erf()[source]
Computes the Gauss error function of self tensor element-wise. Refer to
mindspore.ops.erf()
for more details.- Returns
Tensor, has the same shap dtype as the self Tensor.
- Raises
TypeError – If dtype of self tensor is not float16 or float32.
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> x = Tensor(np.array([-1, 0, 1, 2, 3]), mindspore.float32) >>> output = x.erf() >>> print(output) [-0.8427168 0. 0.8427168 0.99530876 0.99997765]