def distance(self, x, y):
if scipy.sparse.issparse(x):<EOL><INDENT>return numpy.sum(numpy.absolute((x-y).toarray().ravel()))<EOL><DEDENT>else:<EOL><INDENT>return numpy.sum(numpy.absolute(x-y))<EOL><DEDENT>
Computes the Manhattan distance between vectors x and y. Returns float.