Rewrite fuzzy_kmeans by using built-ins only.