diff --git a/pyproject.toml b/pyproject.toml index 0daed0c..f94ec44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ authors = [ { name="Marshall Krassenstein", email="mpkrass@gmail.com"}, ] description = "Create colormaps from images" -readme = "README.md" +readme = "README.rst" requires-python = ">=3.7" classifiers = [ "License :: OSI Approved :: MIT License", diff --git a/src/img2cmap/convert.py b/src/img2cmap/convert.py index c8d72f2..afe43f1 100644 --- a/src/img2cmap/convert.py +++ b/src/img2cmap/convert.py @@ -62,7 +62,7 @@ def generate_cmap(self, n_colors=4, palette_name=None, random_state=None): matplotlib.colors.ListedColormap: A matplotlib ListedColormap object. """ # create a kmeans model - self.kmeans = MiniBatchKMeans(n_clusters=n_colors, random_state=random_state) + self.kmeans = MiniBatchKMeans(n_clusters=n_colors, random_state=random_state, n_init="auto") # fit the model to the pixels self.kmeans.fit(self.pixels) # get the cluster centers