Distance between point and a line (from two points) May 31, 2023 by Tarik Try using the norm function from numpy.linalg d = norm(np.cross(p2-p1, p1-p3))/norm(p2-p1)