def get_centroid_idx(centroids, c):
    """
    Returns the index of a given centroid c. Assumes that centroids
    is the ndarray of shape (k, d) where k is a number of centroids
    and d is a number od dimensions.
    """

    return centroids.tolist().index(c.tolist())