def arc_distance(theta_1, phi_1, theta_2, phi_2):
temp = (np.sin((theta_2-theta_1)/<NUM_LIT:2>)**<NUM_LIT:2><EOL>+ np.cos(theta_1)*np.cos(theta_2) * np.sin((phi_2-phi_1)/<NUM_LIT:2>)**<NUM_LIT:2>)<EOL>distance_matrix = <NUM_LIT:2> * np.arctan2(np.sqrt(temp), np.sqrt(<NUM_LIT:1>-temp))<EOL>return distance_matrix<EOL>
Calculates the pairwise arc distance
between all points in vector a and b.