We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
KMeans implementation issue
centers = np.array([X[clusters == c].mean(0) for c in clusters])
centers's shape is not right, the correct implementation is suggested as
centers = np.array([X[clusters == c].mean(0) for c in range(len(centers))])