(x, y)
return result
r"""Manhattan, taxicab, or l1 distance.

    ..math::
        D(x, y) = \sum_i |x_i - y_i|
r"""Manhattan, taxicab, or l1 distance.
r Manhattan taxicab or l1 distance .
def manhattan(x, y):
    r"""Manhattan, taxicab, or l1 distance.

    ..math::
        D(x, y) = \sum_i |x_i - y_i|
    """
    result = 0.0
    for i in range(x.shape[0]):
        result += np.abs(x[i] - y[i])

    return result
def manhattan ( x , y ) : result = 0.0 for i in range ( x . shape [ 0 ] ) : result += np . abs ( x [ i ] - y [ i ] ) return result