DOC remove FutureWarning in plot_colour_quantization example
@@ -52,7 +52,9 @@ image_array = np.reshape(china, (w * h, d))
print("Fitting model on a small sub-sample of the data")
t0 = time()
image_array_sample = shuffle(image_array, random_state=0, n_samples=1_000)
-kmeans = KMeans(n_clusters=n_colors, random_state=0).fit(image_array_sample)
+kmeans = KMeans(n_clusters=n_colors, n_init="auto", random_state=0).fit(
+ image_array_sample
+)
print(f"done in {time() - t0:0.3f}s.")
# Get labels for all points
