get_centroid_dists function

Computes distance from observations to centroids