polar#

polar(x: Union[jax.Array, numpy.ndarray, numpy.bool_, numpy.number, bool, int, float, complex]) jax.Array[source]#

Convert from rectangular to polar coordinates element-wise.

Parameters

x (ArrayLike) – Array of potentially complex-valued numbers.

Returns

A tuple of arrays where the first is the element-wise magnitude of the argument and the second is the element-wise phase of the argument.

Return type

mag, phi