看下官方手册的用法
numpy.angle(z, deg=0)
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 : ndarray or scalar
The counterclockwise angle from the positive real axis on the complex plane, with dtype as numpy.float64.
import numpy as np
np.angle([1+0.5j,-1+0.5j,1-0.5j,-1-0.5j],deg=True)
假如横轴是实数轴,纵轴是虚轴
对于复数a + bi
相位角是arctan(b/a)
就是跟正弦函数sin一样