docs: def zip_fit_params(data):
      """
      Returns the ZIP parameters that best fit a given data set.
  
      Args:
          data (array): 2d array of genes x cells belonging to a given cluster
  
      Returns:
          L (array): 1d array of means
          M (array): 1d array of zero-inflation parameter
      """
      genes, cells = data.shape
      m = data.mean(1)
      v = data.var(1)
      M = (v-m)/(m**2+v-m)
      #M = v/(v+m**2)
      #M[np.isnan(M)] = 0.0
      M = np.array([min(1.0, max(0.0, x)) for x in M])
      L = m + v/m - 1.0
      #L = (v + m**2)/m
      L[np.isnan(L)] = 0.0
      L = np.array([max(0.0, x) for x in L])
      return L, M