dpnp.scipy.special.erf
- dpnp.scipy.special.erf(x, out=None)
Calculates the Gauss error function of a given input array.
It is defined as \(\frac{2}{\sqrt{\pi}} \int_{0}^{z} e^{-t^2} \, dt\).
For full documentation refer to
scipy.special.erf.- Parameters:
x ({dpnp.ndarray, usm_ndarray}) -- Input array, expected to have a real-valued floating-point data type.
out ({dpnp.ndarray, usm_ndarray}, optional) -- Optional output array for the function values.
- Returns:
out -- The values of the error function at the given points x.
- Return type:
dpnp.ndarray
See also
dpnp.scipy.special.erfcComplementary error function.
dpnp.scipy.special.erfinvInverse of the error function.
dpnp.scipy.special.erfcinvInverse of the complementary error function.
dpnp.scipy.special.erfcxScaled complementary error function.
dpnp.scipy.special.erfiImaginary error function.
Notes
The cumulative of the unit normal distribution is given by
\[\Phi(z) = \frac{1}{2} \left[ 1 + \operatorname{erf} \left( \frac{z}{\sqrt{2}} \right) \right]\]Examples
>>> import dpnp as np >>> x = np.linspace(-3, 3, num=5) >>> np.scipy.special.erf(x) array([[-0.99997791, -0.96610515, 0. , 0.96610515, 0.99997791])