本文整理汇总了Python中sympy.functions.special.bessel.hankel2函数的典型用法代码示例。如果您正苦于以下问题:Python hankel2函数的具体用法?Python hankel2怎么用?Python hankel2使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了hankel2函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_specfun
def test_specfun():
n = Symbol('n')
for f in [besselj, bessely, besseli, besselk]:
assert julia_code(f(n, x)) == f.__name__ + '(n, x)'
for f in [airyai, airyaiprime, airybi, airybiprime]:
assert julia_code(f(x)) == f.__name__ + '(x)'
assert julia_code(hankel1(n, x)) == 'hankelh1(n, x)'
assert julia_code(hankel2(n, x)) == 'hankelh2(n, x)'
assert julia_code(jn(n, x)) == 'sqrt(2)*sqrt(pi)*sqrt(1./x).*besselj(n + 1/2, x)/2'
assert julia_code(yn(n, x)) == 'sqrt(2)*sqrt(pi)*sqrt(1./x).*bessely(n + 1/2, x)/2'
示例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: test_specfun
def test_specfun():
n = Symbol('n')
for f in [besselj, bessely, besseli, besselk]:
assert octave_code(f(n, x)) == f.__name__ + '(n, x)'
assert octave_code(hankel1(n, x)) == 'besselh(n, 1, x)'
assert octave_code(hankel2(n, x)) == 'besselh(n, 2, x)'
assert octave_code(airyai(x)) == 'airy(0, x)'
assert octave_code(airyaiprime(x)) == 'airy(1, x)'
assert octave_code(airybi(x)) == 'airy(2, x)'
assert octave_code(airybiprime(x)) == 'airy(3, x)'
assert octave_code(jn(n, x)) == 'sqrt(2)*sqrt(pi)*sqrt(1./x).*besselj(n + 1/2, x)/2'
assert octave_code(yn(n, x)) == 'sqrt(2)*sqrt(pi)*sqrt(1./x).*bessely(n + 1/2, x)/2'
示例4: 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)'
示例5: test_specfun
def test_specfun():
n = Symbol('n')
for f in [besselj, bessely, besseli, besselk]:
assert octave_code(f(n, x)) == f.__name__ + '(n, x)'
assert octave_code(hankel1(n, x)) == 'besselh(n, 1, x)'
assert octave_code(hankel2(n, x)) == 'besselh(n, 2, x)'
assert octave_code(airyai(x)) == 'airy(0, x)'
assert octave_code(airyaiprime(x)) == 'airy(1, x)'
assert octave_code(airybi(x)) == 'airy(2, x)'
assert octave_code(airybiprime(x)) == 'airy(3, x)'
assert octave_code(uppergamma(n, x)) == 'gammainc(x, n, \'upper\')'
assert octave_code(lowergamma(n, x)) == 'gammainc(x, n, \'lower\')'
assert octave_code(jn(n, x)) == 'sqrt(2)*sqrt(pi)*sqrt(1./x).*besselj(n + 1/2, x)/2'
assert octave_code(yn(n, x)) == 'sqrt(2)*sqrt(pi)*sqrt(1./x).*bessely(n + 1/2, x)/2'
assert octave_code(LambertW(x)) == 'lambertw(x)'
assert octave_code(LambertW(x, n)) == 'lambertw(n, x)'
示例6: test_sympy__functions__special__bessel__hankel2
def test_sympy__functions__special__bessel__hankel2():
from sympy.functions.special.bessel import hankel2
assert _test_args(hankel2(x, 1))