ENH: minor speed-up in k-means