def DistFitDataset(Dat):
<EOL>(r,c) = Dat.shape<EOL>Poiss = np.zeros(r)<EOL>Norm = np.zeros(r)<EOL>LogNorm = np.zeros(r)<EOL>for i in range(r):<EOL><INDENT>temp = GetDistFitError(Dat[i])<EOL>Poiss[i] = temp['<STR_LIT>']<EOL>Norm[i] = temp['<STR_LIT>']<EOL>LogNorm[i] = temp['<STR_LIT>']<EOL><DEDENT>d = {}<EOL>d['<STR_LIT>'] = Poiss<EOL>d['<STR_LIT>'] = Norm<EOL>d['<STR_LIT>'] = LogNorm<EOL>return d<EOL>
Given a data matrix, this returns the per-gene fit error for the
Poisson, Normal, and Log-Normal distributions.

Args:
    Dat (array): numpy array with shape (genes, cells)

Returns:
    d (dict): 'poiss', 'norm', 'lognorm' give the fit error for each distribution.