cupynumeric.angle#

cupynumeric.angle(z: ndarray, deg: bool = False) ndarray#

Return the angle of the complex argument.

Parameters:
  • z (array_like) – A complex number or sequence of complex numbers.

  • deg (bool, optional) – Return angle in degrees if True, radians if False (default).

Returns:

angle – The counterclockwise angle from the positive real axis on the complex plane in the range (-pi, pi], with dtype as numpy.float64.

Return type:

ndarray or scalar

See also

numpy.angle

Notes

This function passes the imaginary and real parts of the argument to arctan2 to compute the result; consequently, it follows the convention of arctan2 when the magnitude of the argument is zero.

Availability:

Multiple GPUs, Multiple CPUs