scipy.special.hankel2e#

scipy.special.hankel2e(v, z, out=None) = <wrapped_ufunc 'hankel2e'>#

Exponentially scaled Hankel function of the second kind.

Defined as:

hankel2e(v, z) = hankel2(v, z) * exp(1j * z)
Parameters:
varray_like

Order (float).

zarray_like

Argument (float or complex).

outndarray, optional

Optional output array for the function values

Returns:
scalar or ndarray

Values of the exponentially scaled Hankel function of the second kind.

Notes

A wrapper for the AMOS [1] routine zbesh, which carries out the computation using the relation,

\[H^{(2)}_v(z) = -\frac{2}{\imath\pi} \exp(\frac{\imath \pi v}{2}) K_v(z \exp(\frac{\imath\pi}{2}))\]

where \(K_v\) is the modified Bessel function of the second kind. For negative orders, the relation

\[H^{(2)}_{-v}(z) = H^{(2)}_v(z) \exp(-\imath\pi v)\]

is used.

Array API Standard Support

hankel2e has support for Python Array API Standard compatible backends in addition to NumPy. The following combinations of backend and device (or other capability) are supported.

Library

CPU

GPU

NumPy

✅

n/a

CuPy

n/a

⛔

PyTorch

✅

⛔

JAX

✅

⛔

Dask

✅

n/a

For the NumPy backend, this function supports all NumPy ufunc keyword arguments. Other backends may support out, but typically none of the other ufunc kwargs. out is typically supported for CuPy and PyTorch, but not currently in cases where SciPy relies on a generic Array API implementation or, for PyTorch on CPU, falls back to the NumPy backend. out is never supported for JAX because JAX arrays are immutable. hankel2e does not currently support out for the PyTorch backend.

See Support for the array API standard for more information.

References

[1]

Donald E. Amos, “AMOS, A Portable Package for Bessel Functions of a Complex Argument and Nonnegative Order”, http://netlib.org/amos/