scipy.special.hyp1f1#
- scipy.special.hyp1f1(a, b, x, out=None) = <ufunc 'hyp1f1'>#
- Confluent hypergeometric function 1F1. - The confluent hypergeometric function is defined by the series \[{}_1F_1(a; b; x) = \sum_{k = 0}^\infty \frac{(a)_k}{(b)_k k!} x^k.\]- See [dlmf] for more details. Here \((\cdot)_k\) is the Pochhammer symbol; see - poch.- Parameters:
- a, barray_like
- Real parameters 
- xarray_like
- Real or complex argument 
- outndarray, optional
- Optional output array for the function results 
 
- Returns:
- scalar or ndarray
- Values of the confluent hypergeometric function 
 
 - See also - Notes - For real values, this function uses the - hyp1f1routine from the C++ Boost library [2], for complex values a C translation of the specfun Fortran library [3].- References [dlmf]- NIST Digital Library of Mathematical Functions https://dlmf.nist.gov/13.2#E2 [2]- The Boost Developers. “Boost C++ Libraries”. https://www.boost.org/. [3]- Zhang, Jin, “Computation of Special Functions”, John Wiley and Sons, Inc, 1996. - Examples - >>> import numpy as np >>> import scipy.special as sc - It is one when x is zero: - >>> sc.hyp1f1(0.5, 0.5, 0) 1.0 - It is singular when b is a nonpositive integer. - >>> sc.hyp1f1(0.5, -1, 0) inf - It is a polynomial when a is a nonpositive integer. - >>> a, b, x = -1, 0.5, np.array([1.0, 2.0, 3.0, 4.0]) >>> sc.hyp1f1(a, b, x) array([-1., -3., -5., -7.]) >>> 1 + (a / b) * x array([-1., -3., -5., -7.]) - It reduces to the exponential function when - a = b.- >>> sc.hyp1f1(2, 2, [1, 2, 3, 4]) array([ 2.71828183, 7.3890561 , 20.08553692, 54.59815003]) >>> np.exp([1, 2, 3, 4]) array([ 2.71828183, 7.3890561 , 20.08553692, 54.59815003])