mindspore.ops.BesselK0e

查看源文件
class mindspore.ops.BesselK0e[源代码]

逐元素计算指数缩放第二类零阶修正Bessel函数值。

计算公式定义如下:

\[\begin{split}\begin{array}{ll} \\ K_{0}e(x)= e^{(-|x|)} * K_{0}(x) = e^{(-|x|)} * \int_{0}^ {\infty} e^{-x \cosh t} d t \end{array}\end{split}\]

其中 \(K_{0}\) 是第二类零阶修正Bessel函数。

警告

这是一个实验性API,后续可能修改或删除。

输入:
  • x (Tensor) - 输入Tensor。数据类型应为float16、float32或float64。

输出:

Tensor,shape和数据类型与 x 相同。

异常:
  • TypeError - x 不是float16、float32或float64数据类型的Tensor。

支持平台:

GPU CPU

样例:

>>> import mindspore
>>> import numpy as np
>>> from mindspore import Tensor, ops
>>> bessel_k0e = ops.BesselK0e()
>>> x = Tensor(np.array([0.24, 0.83, 0.31, 0.09]), mindspore.float32)
>>> output = bessel_k0e(x)
>>> print(output)
[2.0083523 1.2388839 1.8303517 2.769374 ]