def poisson_ll(data, means):
if sparse.issparse(data):<EOL><INDENT>return sparse_poisson_ll(data, means)<EOL><DEDENT>genes, cells = data.shape<EOL>clusters = means.shape[<NUM_LIT:1>]<EOL>ll = np.zeros((cells, clusters))<EOL>for i in range(clusters):<EOL><INDENT>means_i = np.tile(means[:,i], (cells, <NUM_LIT:1>))<EOL>means_i = means_i.transpose() + eps<EOL>ll[:,i] = np.sum(xlogy(data, means_i) - means_i, <NUM_LIT:0>)<EOL><DEDENT>return ll<EOL>
Calculates the Poisson log-likelihood.

Args:
    data (array): 2d numpy array of genes x cells
    means (array): 2d numpy array of genes x k

Returns:
    cells x k array of log-likelihood for each cell/cluster pair