def _validate_center_shape(X, n_centers, centers):
 if (len(centers) != n_centers):
  raise ValueError(('The shape of the initial centers (%s) does not match the number of clusters %i' % (centers.shape, n_centers)))
 if (centers.shape[1] != X.shape[1]):
  raise ValueError(('The number of features of the initial centers %s does not match the number of features of the data %s.' % (centers.shape[1], X.shape[1])))

def _validate_center_shape ( X , n_centers , centers ) : if ( len ( centers ) != n_centers ) : raise ValueError ( ( 'The shape of the initial centers (%s) does not match the number of clusters %i' % ( centers . shape , n_centers ) ) ) if ( centers . shape [ 1 ] != X . shape [ 1 ] ) : raise ValueError ( ( 'The number of features of the initial centers %s does not match the number of features of the data %s.' % ( centers . shape [ 1 ] , X . shape [ 1 ] ) ) )
check if centers is compatible with x and n_centers .