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

26 lines
1.0 KiB
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.Polar
====================
.. py:class:: mindspore.ops.Polar
将极坐标转化为笛卡尔坐标。
返回一个复数Tensor其元素是由输入极坐标构造的笛卡尔坐标。其中极坐标由极径 `abs` 和极角 `angle` 给定。
.. math::
y_{i} = abs_{i} * cos(angle_{i}) + abs_{i} * sin(angle_{i}) * j
输入:
- **abs** (Tensor) - 极径。Tensor的shape为 :math:`(N,*)` ,其中 :math:`N` 为输入Tensor的批量大小 :math:`*` 为任意数量的额外维度。其数据类型须为float32、float64。
- **angle** (Tensor) - 极角。其shape与数据类型与 `abs` 一致。
输出:
Tensor。其shape与数据类型与 `abs` 一致。
异常:
- **TypeError** - `abs``angle` 不是Tensor。
- **TypeError** - 输入数据类型不是float32或float64。
- **TypeError** - `abs``angle` 数据类型不一致。
- **ValueError** - `abs``angle` 的shape不一致。