bundles / scipy latest / scipy / special / _basic / kvp
function
scipy.special._basic:kvp
source: /scipy/special/_basic.py :977
Signature
def kvp ( v , z , n = 1 ) Summary
Compute derivatives of real-order modified Bessel function Kv(z)
Extended Summary
Kv(z) is the modified Bessel function of the second kind. Derivative is calculated with respect to z.
Parameters
v: array_like of floatOrder of Bessel function
z: array_like of complexArgument at which to evaluate the derivative
n: int, default 1Order of derivative. For 0 returns the Bessel function kv itself.
Returns
out: ndarrayThe results
Notes
The derivative is computed using the relation DLFM 10.29.5 [2].
Examples
Compute the modified bessel function of the second kind of order 0 and its first two derivatives at 1.from scipy.special import kvp
✓kvp(0, 1, 0), kvp(0, 1, 1), kvp(0, 1, 2)
✗kvp([0, 1, 2], 1, 1)
✗import numpy as np points = np.array([0.5, 1.5, 3.])✓
kvp(0, points, 1)
✗import matplotlib.pyplot as plt x = np.linspace(0, 5, 1000) fig, ax = plt.subplots()✓
ax.plot(x, kvp(1, x, 0), label=r"$K_1$") ax.plot(x, kvp(1, x, 1), label=r"$K_1'$") ax.plot(x, kvp(1, x, 2), label=r"$K_1''$") ax.plot(x, kvp(1, x, 3), label=r"$K_1'''$") ax.set_ylim(-2.5, 2.5) plt.legend()✗
plt.show()
✓
See also
Aliases
-
scipy.special.kvp