def trainGMM(features, nComp, covType = 'diag'): Gs = [] for f in features: gmm = mixture.GMM(n_components=int(nComp), covariance_type = covType) Gs.append(gmm.fit(f)) return Gs