def paired_manhattan_distances(X, Y):
    X, Y = check_paired_arrays(X, Y)
    diff = X - Y
    if issparse(diff):
        diff.data = np.abs(diff.data)
        return np.squeeze(np.array(diff.sum(axis=1)))
    else:
        return np.abs(diff).sum(axis=-1)
Compute the L1 distances between the vectors in X and Y.
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/metrics/pairwise.py/paired_manhattan_distances