import numpy as np u = np.array([1,0,0]) v = np.array([1,1,0]) cos = np.clip(np.dot(u, v) / (np.linalg.norm(u) * np.linalg.norm(v)), -1.0, 1.0) theta = np.arccos(cos) if np.cross(u, v)[2] < 0: theta *= -1 deg = np.rad2deg(theta) print(deg)