mindspore/docs/api/api_python/ops/mindspore.ops.func_sinc.rst

22 lines
609 B
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.ops.sinc
==================
.. py:function:: mindspore.ops.sinc(x)
按照以下公式逐元素计算输入Tensor的数学正弦函数。
.. math::
out_i = \begin{cases} \frac{sin(\pi x_i)}{x_i} & x_i\neq 0\\
1 & x_i=0 \end{cases}
参数:
- **x** (Tensor) - `x` 的shape为 :math:`(x_1, x_2, ..., x_R)`
返回:
Tensorshape与 `x` 相同。
当输入类型为int或bool时返回值类型为float32。
否则,返回值类型与输入类型相同。
异常:
- **TypeError** - 如果 `x` 不是Tensor。