diff --git a/src/beignet/special/_dawson_integral_f.py b/src/beignet/special/_dawson_integral_f.py index a6aed878cc..e1cf5e190a 100644 --- a/src/beignet/special/_dawson_integral_f.py +++ b/src/beignet/special/_dawson_integral_f.py @@ -7,4 +7,13 @@ def dawson_integral_f(input: Tensor) -> Tensor: + r""" + Parameters + ---------- + input : Tensor + + Returns + ------- + Tensor + """ return math.sqrt(torch.pi) / 2.0 * torch.exp(-(input**2)) * error_erfi(input) diff --git a/src/beignet/special/_error_erf.py b/src/beignet/special/_error_erf.py index ad701532c8..4b41d2c7cd 100644 --- a/src/beignet/special/_error_erf.py +++ b/src/beignet/special/_error_erf.py @@ -4,4 +4,15 @@ def error_erf(input: Tensor) -> Tensor: + r""" + Error function. + + Parameters + ---------- + input : Tensor + + Returns + ------- + Tensor + """ return 1.0 - error_erfc(input) diff --git a/src/beignet/special/_error_erfc.py b/src/beignet/special/_error_erfc.py index e687da4651..706890e19a 100644 --- a/src/beignet/special/_error_erfc.py +++ b/src/beignet/special/_error_erfc.py @@ -5,4 +5,15 @@ def error_erfc(input: Tensor) -> Tensor: + r""" + Complementary error function. + + Parameters + ---------- + input : Tensor + + Returns + ------- + Tensor + """ return torch.exp(-torch.pow(input, 2)) * faddeeva_w(1.0j * input) diff --git a/src/beignet/special/_error_erfi.py b/src/beignet/special/_error_erfi.py index d8078f08af..ce372a853b 100644 --- a/src/beignet/special/_error_erfi.py +++ b/src/beignet/special/_error_erfi.py @@ -4,11 +4,12 @@ def error_erfi(input: Tensor) -> Tensor: - r"""Imaginary error function. + r""" + Imaginary error function. Parameters ---------- - input: Tensor + input : Tensor Returns ------- diff --git a/src/beignet/special/_faddeeva_w.py b/src/beignet/special/_faddeeva_w.py index c7bb9d4cb9..d721d5d170 100644 --- a/src/beignet/special/_faddeeva_w.py +++ b/src/beignet/special/_faddeeva_w.py @@ -159,19 +159,15 @@ def _faddeeva_w_impl(z): return _voigt_v_impl(z.real, z.imag) + 1j * _voigt_l_impl(z.real, z.imag) -def faddeeva_w(input: Tensor): - r"""Compute faddeeva w function using method described in [1]. - +def faddeeva_w(input: Tensor) -> Tensor: + r""" Parameters ---------- - input: Tensor - complex input + input : Tensor - References - ---------- - [1] Al Azah, Mohammad, and Simon N. Chandler-Wilde. - "Computation of the complex error function using modified trapezoidal rules." - SIAM Journal on Numerical Analysis 59.5 (2021): 2346-2367. + Returns + ------- + Tensor """ # use symmetries to map to upper right quadrant of complex plane imag_negative = input.imag < 0.0