def _estimate_gaussian_parameters(X, resp, reg_covar, covariance_type):
    compute_covariance = {
        "full": _estimate_gaussian_covariance_full,
        "tied": _estimate_gaussian_covariance_tied,
        "diag": _estimate_gaussian_covariance_diag,
        "spherical": _estimate_gaussian_covariance_spherical}

    nk = resp.sum(axis=0) + 10 * np.finfo(resp.dtype).eps
    means = np.dot(resp.T, X) / nk[:, np.newaxis]
    covariances = compute_covariance[covariance_type](
        resp, X, nk, means, reg_covar)

    return nk, means, covariances


###############################################################################
# Gaussian mixture probability estimators
Estimate the Gaussian distribution parameters.
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/mixture/gaussian_mixture.py/_estimate_gaussian_parameters