def get_centroids(data,k,labels,centroids,data_norms):
D = data.shape[<NUM_LIT:1>]    <EOL>for j in range(k):<EOL><INDENT>cluster_points = np.where(labels == j)<EOL>cluster_total = len(cluster_points)<EOL>if cluster_total == <NUM_LIT:0>:<EOL><INDENT>_, temp = new_orthogonal_center(data,data_norms,centroids)<EOL><DEDENT>else:<EOL><INDENT>temp = np.mean(data[cluster_points,:],axis=<NUM_LIT:1>)      <EOL><DEDENT>centroids[j,:] = temp<EOL><DEDENT>return centroids<EOL>
For each element in the dataset, choose the closest centroid

Parameters
------------
data: array-like, shape= (m_samples,n_samples)
K: integer, number of K clusters  
centroids: array-like, shape=(K, n_samples)     
labels: array-like, shape (1,n_samples)
returns
-------------
centroids: array-like, shape (K,n_samples)