scipy.special.erfcx#
- scipy.special.erfcx(x, out=None) = <ufunc 'erfcx'>#
Scaled complementary error function,
exp(x**2) * erfc(x)
.- Parameters:
- xarray_like
Real or complex valued argument
- outndarray, optional
Optional output array for the function results
- Returns:
- scalar or ndarray
Values of the scaled complementary error function
Notes
Added in version 0.12.0.
erfcx
has experimental support for Python Array API Standard compatible backends in addition to NumPy. Please consider testing these features by setting an environment variableSCIPY_ARRAY_API=1
and providing CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following combinations of backend and device (or other capability) are supported.Library
CPU
GPU
NumPy
✅
n/a
CuPy
n/a
✅
PyTorch
✅
✅
JAX
⚠️ no JIT
⛔
Dask
✅
n/a
See Support for the array API standard for more information.
References
[1]Steven G. Johnson, Faddeeva W function implementation. http://ab-initio.mit.edu/Faddeeva
Examples
>>> import numpy as np >>> from scipy import special >>> import matplotlib.pyplot as plt >>> x = np.linspace(-3, 3) >>> plt.plot(x, special.erfcx(x)) >>> plt.xlabel('$x$') >>> plt.ylabel('$erfcx(x)$') >>> plt.show()