scipy.special.hyp0f1#

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

Confluent hypergeometric limit function \({}_0F_1(; v; z)\).

Parameters:
varray_like

Real-valued parameter

zarray_like

Real- or complex-valued argument

outndarray, optional

Optional output array for the function results

Returns:
scalar or ndarray

The confluent hypergeometric limit function

Notes

This function is defined as:

\[{}_0F_1(; v; z) = \sum_{k=0}^{\infty}\frac{z^k}{(v)_k k!}.\]

where \((\cdot)_k\) is the Pochhammer symbol; see poch. It is also the limit as \(q \to \infty\) of \({}_1F_1(q; v; z/q)\), and satisfies the differential equation \(z f''(z) + vf'(z) = f(z)\). See [1] for more information.

Array API Standard Support

hyp0f1 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. hyp0f1 does not currently support out for the PyTorch backend.

See Array API coverage for more information.

References

[1]

Wolfram MathWorld, “Confluent Hypergeometric Limit Function”, https://mathworld.wolfram.com/ConfluentHypergeometricLimitFunction.html

Examples

>>> import numpy as np
>>> import scipy.special as sc

It is one when z is zero.

>>> sc.hyp0f1(1, 0)
1.0

It is the limit of the confluent hypergeometric function as q goes to infinity.

>>> q = np.array([1, 10, 100, 1000])
>>> v = 1
>>> z = 1
>>> sc.hyp1f1(q, v, z / q)
array([2.71828183, 2.31481985, 2.28303778, 2.27992985])
>>> sc.hyp0f1(v, z)
2.2795853023360673

It is related to Bessel functions.

>>> n = 1
>>> x = np.linspace(0, 1, 5)
>>> sc.jv(n, x)
array([0.        , 0.12402598, 0.24226846, 0.3492436 , 0.44005059])
>>> (0.5 * x)**n / sc.factorial(n) * sc.hyp0f1(n + 1, -0.25 * x**2)
array([0.        , 0.12402598, 0.24226846, 0.3492436 , 0.44005059])