dask.array.angle — Dask documentation (original) (raw)
Return the angle of the complex argument.
This docstring was copied from numpy.angle.
Some inconsistencies with the Dask version may exist.
This function passes the imaginary and real parts of the argument toarctan2 to compute the result; consequently, it follows the convention of arctan2 when the magnitude of the argument is zero. See example.
import numpy as np
np.angle([1.0, 1.0j, 1+1j]) # in radians
array([ 0. , 1.57079633, 0.78539816]) # may vary np.angle(1+1j, deg=True) # in degrees
45.0 np.angle([0., -0., complex(0., -0.), complex(-0., -0.)]) # convention
array([ 0. , 3.14159265, -0. , -3.14159265])