本文整理汇总了Python中sympy.functions.special.bessel.besselk函数的典型用法代码示例。如果您正苦于以下问题:Python besselk函数的具体用法?Python besselk怎么用?Python besselk使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了besselk函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_latex_bessel
def test_latex_bessel():
from sympy.functions.special.bessel import besselj, bessely, besseli, besselk, hankel1, hankel2, jn, yn
from sympy.abc import z
assert latex(besselj(n, z ** 2) ** k) == r"J^{k}_{n}\left(z^{2}\right)"
assert latex(bessely(n, z)) == r"Y_{n}\left(z\right)"
assert latex(besseli(n, z)) == r"I_{n}\left(z\right)"
assert latex(besselk(n, z)) == r"K_{n}\left(z\right)"
assert latex(hankel1(n, z ** 2) ** 2) == r"\left(H^{(1)}_{n}\left(z^{2}\right)\right)^{2}"
assert latex(hankel2(n, z)) == r"H^{(2)}_{n}\left(z\right)"
assert latex(jn(n, z)) == r"j_{n}\left(z\right)"
assert latex(yn(n, z)) == r"y_{n}\left(z\right)"
示例2: test_latex_bessel
def test_latex_bessel():
from sympy.functions.special.bessel import (besselj, bessely, besseli,
besselk, hankel1, hankel2, jn, yn)
from sympy.abc import z
assert latex(besselj(n, z**2)**k) == r'J^{k}_{n}\left(z^{2}\right)'
assert latex(bessely(n, z)) == r'Y_{n}\left(z\right)'
assert latex(besseli(n, z)) == r'I_{n}\left(z\right)'
assert latex(besselk(n, z)) == r'K_{n}\left(z\right)'
assert latex(hankel1(n, z**2)**2) == \
r'\left(H^{(1)}_{n}\left(z^{2}\right)\right)^{2}'
assert latex(hankel2(n, z)) == r'H^{(2)}_{n}\left(z\right)'
assert latex(jn(n, z)) == r'j_{n}\left(z\right)'
assert latex(yn(n, z)) == r'y_{n}\left(z\right)'
示例3: pdf
def pdf(self, *args):
from sympy.functions.special.bessel import besselk
mu, sigma = self.mu, self.sigma
mu_T = mu.transpose()
k = S(len(mu))
sigma_inv = sigma.inv()
args = ImmutableMatrix(args)
args_T = args.transpose()
x = (mu_T*sigma_inv*mu)[0]
y = (args_T*sigma_inv*args)[0]
v = 1 - k/2
return S(2)/((2*pi)**(S(k)/2)*sqrt(det(sigma)))\
*(y/(2 + x))**(S(v)/2)*besselk(v, sqrt((2 + x)*(y)))\
*exp((args_T*sigma_inv*mu)[0])
示例4: test_sympy__functions__special__bessel__besselk
def test_sympy__functions__special__bessel__besselk():
from sympy.functions.special.bessel import besselk
assert _test_args(besselk(x, 1))