戴云山隧道贯通 厦沙高速德化段控制性工程基本完成

paddle. polar ( abs: Tensor, angle: Tensor, name: Optional[str] = None ) Tensor [source]
百度 他说这款致敬品牌诞生地的腕表让他感受到了浓厚的历史沉淀与潮流现代风潮的有机结合,同时经典又满载巧思细节的外观更是日常搭配的绝佳配饰。

Return a Cartesian coordinates corresponding to the polar coordinates complex tensor given the abs and angle component.

Parameters
  • abs (Tensor) – The abs component. The data type should be ‘float32’ or ‘float64’.

  • angle (Tensor) – The angle component. The data type should be the same as abs.

  • name (str|None, optional) – For details, please refer to Name. Generally, no setting is required. Default: None.

Returns

Tensor, The output tensor. The data type is ‘complex64’ or ‘complex128’, with the same precision as abs and angle.

Note

paddle.polar supports broadcasting. If you want know more about broadcasting, please refer to Introduction to Tensor .

Examples

>>> import paddle
>>> import numpy as np

>>> abs = paddle.to_tensor([1, 2], dtype=paddle.float64)
>>> angle = paddle.to_tensor([np.pi / 2, 5 * np.pi / 4], dtype=paddle.float64)
>>> out = paddle.polar(abs, angle)
>>> print(out)
Tensor(shape=[2], dtype=complex128, place=Place(cpu), stop_gradient=True,
[ (6.123233995736766e-17+1j)             ,
 (-1.4142135623730954-1.414213562373095j)])