scipy.special.hyperu#
- scipy.special.hyperu(a, b, x, out=None) = <wrapped_ufunc 'hyperu'>#
Confluent hypergeometric function \(U(a, b, x)\).
It is defined as the solution to the equation
\[x \frac{d^2w}{dx^2} + (b - x) \frac{dw}{dx} - aw = 0\]which satisfies the property
\[U(a, b, x) \sim x^{-a}\]as \(x \to \infty\). See [DLMF] for more details.
- Parameters:
- a, barray_like
Real-valued parameters
- xarray_like
Real-valued argument
- outndarray, optional
Optional output array for the function values
- Returns:
- scalar or ndarray
Values of \(U(a, b, x)\)
Notes
Array API Standard Support
hyperuhas 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.outis 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.outis never supported for JAX because JAX arrays are immutable.hyperudoes not currently supportoutfor the PyTorch backend.See Array API coverage for more information.
References
[DLMF]NIST Digital Library of Mathematics Functions https://dlmf.nist.gov/13.2#E6
Examples
>>> import numpy as np >>> import scipy.special as sc
It has a branch cut along the negative x axis.
>>> x = np.linspace(-0.1, -10, 5) >>> sc.hyperu(1, 1, x) array([nan, nan, nan, nan, nan])
For \(a = 1\) and \(b = 1\), it approaches zero as x goes to infinity.
>>> x = np.array([1, 10, 100]) >>> sc.hyperu(1, 1, x) array([0.59634736, 0.09156333, 0.00990194])
It satisfies Kummer’s transformation.
>>> a, b, x = 2, 1, 1 >>> sc.hyperu(a, b, x) 0.1926947246463881 >>> x**(1 - b) * sc.hyperu(a - b + 1, 2 - b, x) 0.1926947246463881