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