def distance(self, x, y):
        if scipy.sparse.issparse(x):
            return numpy.sum(numpy.absolute((x-y).toarray().ravel()))
        else:
            return numpy.sum(numpy.absolute(x-y))
Computes the Manhattan distance between vectors x and y. Returns float.
dataset/ETHPy150Open pixelogik/NearPy/nearpy/distances/manhattan.py/ManhattanDistance.distance