# tensorplay.functional.polar Source: https://www.tensorplay.cn/docs/generated/tensorplay.functional.polar.html ```python tensorplay.functional.polar(abs, angle, *, out=None) → Tensor ``` Constructs a complex tensor whose elements are Cartesian coordinates corresponding to the polar coordinates with absolute value [abs](/docs/generated/tensorplay.functional.abs.html#tensorplay.functional.abs) and angle [angle](/docs/generated/tensorplay.functional.angle.html#tensorplay.functional.angle). $$\text{out} = \text{abs} \cdot \cos(\text{angle}) + \text{abs} \cdot \sin(\text{angle}) \cdot j$$ > **Note** > > tensorplay.polar is similar to std::polar and does not compute the polar decomposition of a complex tensor like Python’s cmath.polar and SciPy’s linalg.polar do. The behavior of this function is undefined if abs is negative or NaN, or if angle is infinite. Parameters: - abs ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor)) – The absolute value the complex tensor. Must be float or double. - angle ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor)) – The angle of the complex tensor. Must be same dtype as [abs](/docs/generated/tensorplay.functional.abs.html#tensorplay.functional.abs). Keyword Arguments: out ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor)) – If the inputs are tensorplay.float32, must be tensorplay.complex64. If the inputs are tensorplay.float64, must be tensorplay.complex128. Example: ``` >>> import numpy as np >>> abs = tensorplay.tensor([1, 2], dtype=tensorplay.float64) >>> angle = tensorplay.tensor([np.pi / 2, 5 * np.pi / 4], dtype=tensorplay.float64) >>> z = tensorplay.polar(abs, angle) >>> z tensor([(0.0000+1.0000j), (-1.4142-1.4142j)], dtype=tensorplay.complex128) ```