get_centroids_distance gets called twice during e_step in kmeans