#NEWLINE# def _estimate_gaussian_covariance_spherical( resp , X , nk , means , reg_covar ) : #NEWLINE# #INDENT# 'Estimate the spherical covariance matrices.\n\n    Parameters\n    ----------\n    responsibilities : array-like, shape (n_samples, n_components)\n\n    X : array-like, shape (n_samples, n_features)\n\n    nk : array-like, shape (n_components,)\n\n    means : array-like, shape (n_components, n_features)\n\n    reg_covar : float\n\n    Returns\n    -------\n    covariances : array, shape (n_components,)\n    ' #NEWLINE# covariances = _estimate_gaussian_covariance_diag ( resp , X , nk , means , reg_covar ) #NEWLINE# return covariances . mean ( axis = 1 )