def poisson_dist(p1, p2):
<EOL>p1_ = p1 + eps<EOL>p2_ = p2 + eps<EOL>return np.dot(p1_-p2_, np.log(p1_/p2_))<EOL>
Calculates the Poisson distance between two vectors.

p1 can be a sparse matrix, while p2 has to be a dense matrix.