'The Canberra Distance from self to point p.
Returns the weighted sum of horizontal and vertical distances to
point p.
Parameters
p : Point
Returns
canberra_distance : The weighted sum of horizontal and vertical
distances to point p. The weight used is the sum of absolute values
of the coordinates.
See Also
sympy.geometry.point.Point.distance
Examples
>>> from sympy.geometry import Point
>>> p1, p2 = Point(1, 1), Point(3, 3)
>>> p1.canberra_distance(p2)
1
>>> p1, p2 = Point(0, 0), Point(3, 3)
>>> p1.canberra_distance(p2)
2
Raises
ValueError when both vectors are zero.
See Also
sympy.geometry.point.Point.distance'

def canberra_distance(self, p):

    (s, p) = Point._normalize_dimension(self, Point(p))
    if (self.is_zero and p.is_zero):
        raise ValueError('Cannot    project    to    the    zero    vector.')
    return Add(*((abs((a - b)) / (abs(a) + abs(b))) for (a, b) in zip(s, p)))
