def Kmeans(data, num_K): centroid, label = kmeans2( data=data, k=num_K, iter=100, minit='points', missing='warn') return centroid, label