Compute K-means clustering on the given features.
feats (np.ndarray) – Features to cluster. Shape (N, D).
k (int) – Number of clusters.
niter (int) – Number of iterations.
gpu (bool) – Whether to use GPU.
Cluster centers and cluster assignments.
(np.ndarray, np.ndarray)