@deprecated('The functon distribute_covar_matrix_to_match_covariance_typeis deprecated in 0.18 and will be removed in 0.20.')
def distribute_covar_matrix_to_match_covariance_type(tied_cv, covariance_type, n_components):
 if (covariance_type == 'spherical'):
  cv = np.tile((tied_cv.mean() * np.ones(tied_cv.shape[1])), (n_components, 1))
 elif (covariance_type == 'tied'):
  cv = tied_cv
 elif (covariance_type == 'diag'):
  cv = np.tile(np.diag(tied_cv), (n_components, 1))
 elif (covariance_type == 'full'):
  cv = np.tile(tied_cv, (n_components, 1, 1))
 else:
  raise ValueError(('covariance_type must be one of ' + "'spherical', 'tied', 'diag', 'full'"))
 return cv

@ deprecated ( 'The functon distribute_covar_matrix_to_match_covariance_typeis deprecated in 0.18 and will be removed in 0.20.' ) def distribute_covar_matrix_to_match_covariance_type ( tied_cv , covariance_type , n_components ) : if ( covariance_type == 'spherical' ) : cv = np . tile ( ( tied_cv . mean ( ) * np . ones ( tied_cv . shape [ 1 ] ) ) , ( n_components , 1 ) ) elif ( covariance_type == 'tied' ) : cv = tied_cv elif ( covariance_type == 'diag' ) : cv = np . tile ( np . diag ( tied_cv ) , ( n_components , 1 ) ) elif ( covariance_type == 'full' ) : cv = np . tile ( tied_cv , ( n_components , 1 , 1 ) ) else : raise ValueError ( ( 'covariance_type must be one of ' + "'spherical', 'tied', 'diag', 'full'" ) ) return cv
create all the covariance matrices from a given template .