Skip to content

Instantly share code, notes, and snippets.

@goddoe
Created February 1, 2018 06:17
Show Gist options
  • Save goddoe/befb5be2f857fd36fafbace3e1ba5b6d to your computer and use it in GitHub Desktop.
Save goddoe/befb5be2f857fd36fafbace3e1ba5b6d to your computer and use it in GitHub Desktop.
from multiprocessing.dummy import Pool
from sklearn.cluster import KMeans
import functools
...
pool = Pool()
results = pool.map(functools.partial(find_cluster, kmeans=kmeans, X=X), clusters)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment