use np.hypot instead of np.abs(complex) as it is easier to understand