scipp.erf#

scipp.erf(x)#

Computes the error function.

Parameters:

x (TypeVar(VariableLikeType, Variable, DataArray, Dataset, DataGroup[Any])) – Input data.

Returns:

TypeVar(VariableLikeType, Variable, DataArray, Dataset, DataGroup[Any]) – Error function values of the input.

Examples

Compute error function:

>>> import scipp as sc
>>> x = sc.array(dims=['x'], values=[-2.0, -1.0, 0.0, 1.0, 2.0])
>>> sc.erf(x)
<scipp.Variable> (x: 5)    float64  [dimensionless]  [-0.995322, -0.842701, ..., 0.842701, 0.995322]

The error function is odd symmetric: erf(-x) = -erf(x).