The program would panic in the mcmc loop when trying to draw a new center if all the observation are exactly equal to one centroid of the current configuration.
All observation to centroid minimal distance would be zero and the kmeans++ iteration would try to draw over the null set.
An error is returned when all weight are zero in the kmeans++ draw. This error bubbles up to the mcmc iteration which leave the centroids number unchanged when this happens.
The program would panic in the mcmc loop when trying to draw a new center if all the observation are exactly equal to one centroid of the current configuration. All observation to centroid minimal distance would be zero and the kmeans++ iteration would try to draw over the null set.