scipy.special.k1#
- scipy.special.k1(x, out=None) = <ufunc 'k1'>#
- Modified Bessel function of the second kind of order 1, \(K_1(x)\). - Parameters:
- xarray_like
- Argument (float) 
- outndarray, optional
- Optional output array for the function values 
 
- Returns:
- Kscalar or ndarray
- Value of the modified Bessel function K of order 1 at x. 
 
 - See also - Notes - The range is partitioned into the two intervals [0, 2] and (2, infinity). Chebyshev polynomial expansions are employed in each interval. - This function is a wrapper for the Cephes [1] routine - k1.- References [1]- Cephes Mathematical Functions Library, http://www.netlib.org/cephes/ - Examples - Calculate the function at one point: - >>> from scipy.special import k1 >>> k1(1.) 0.6019072301972346 - Calculate the function at several points: - >>> import numpy as np >>> k1(np.array([0.5, 2., 3.])) array([1.65644112, 0.13986588, 0.04015643]) - Plot the function from 0 to 10. - >>> import matplotlib.pyplot as plt >>> fig, ax = plt.subplots() >>> x = np.linspace(0., 10., 1000) >>> y = k1(x) >>> ax.plot(x, y) >>> plt.show() 