42
42
import dpnp .backend .extensions .ufunc ._ufunc_impl as ufi
43
43
from dpnp .dpnp_algo .dpnp_elementwise_common import DPNPUnaryFunc
44
44
45
- __all__ = ["erf" , "erfc" ]
45
+ __all__ = ["erf" , "erfc" , "erfcx" ]
46
46
47
47
48
48
# pylint: disable=too-few-public-methods
@@ -96,7 +96,6 @@ def __call__(self, x, out=None): # pylint: disable=signature-differs
96
96
:obj:`dpnp.special.erfinv` : Inverse of the error function.
97
97
:obj:`dpnp.special.erfcinv` : Inverse of the complementary error function.
98
98
:obj:`dpnp.special.erfcx` : Scaled complementary error function.
99
- :obj:`dpnp.special.erfi` : Imaginary error function.
100
99
101
100
Notes
102
101
-----
@@ -152,7 +151,6 @@ def __call__(self, x, out=None): # pylint: disable=signature-differs
152
151
:obj:`dpnp.special.erfinv` : Inverse of the error function.
153
152
:obj:`dpnp.special.erfcinv` : Inverse of the complementary error function.
154
153
:obj:`dpnp.special.erfcx` : Scaled complementary error function.
155
- :obj:`dpnp.special.erfi` : Imaginary error function.
156
154
157
155
Examples
158
156
--------
@@ -171,3 +169,48 @@ def __call__(self, x, out=None): # pylint: disable=signature-differs
171
169
mkl_fn_to_call = "_mkl_erf_to_call" ,
172
170
mkl_impl_fn = "_erfc" ,
173
171
)
172
+
173
+ _ERFCX_DOCSTRING = r"""
174
+ Calculates the scaled complementary error function of a given input array.
175
+
176
+ It is defined as :math:`\exp(x^2) * \operatorname{erfc}(x)`.
177
+
178
+ For full documentation refer to :obj:`scipy.special.erfcx`.
179
+
180
+ Parameters
181
+ ----------
182
+ x : {dpnp.ndarray, usm_ndarray}
183
+ Input array, expected to have a real-valued floating-point data type.
184
+ out : {dpnp.ndarray, usm_ndarray}, optional
185
+ Optional output array for the function values.
186
+
187
+ Returns
188
+ -------
189
+ out : dpnp.ndarray
190
+ The values of the scaled complementary error function at the given points
191
+ `x`.
192
+
193
+ See Also
194
+ --------
195
+ :obj:`dpnp.special.erf` : Gauss error function.
196
+ :obj:`dpnp.special.erfc` : Complementary error function.
197
+ :obj:`dpnp.special.erfinv` : Inverse of the error function.
198
+ :obj:`dpnp.special.erfcinv` : Inverse of the complementary error function.
199
+
200
+ Examples
201
+ --------
202
+ >>> import dpnp as np
203
+ >>> x = np.linspace(-3, 3, num=4)
204
+ >>> np.special.erfcx(x)
205
+ array([1.62059889e+04, 5.00898008e+00, 4.27583576e-01, 1.79001151e-01])
206
+
207
+ """
208
+
209
+ erfcx = DPNPErf (
210
+ "erfcx" ,
211
+ ufi ._erf_result_type ,
212
+ ufi ._erfcx ,
213
+ _ERFCX_DOCSTRING ,
214
+ mkl_fn_to_call = "_mkl_erf_to_call" ,
215
+ mkl_impl_fn = "_erfcx" ,
216
+ )
0 commit comments