def _get_cluster_idx(self, X, centroids):
        for sample_idx, sample in enumerate(X):
            # dist = [euclidean(sample, c) for c in self.centroids_]
            dist = np.sqrt(np.sum(np.square(sample - self.centroids_), axis=1))

            yield np.argmin(dist)
dataset/ETHPy150Open rasbt/mlxtend/mlxtend/cluster/kmeans.py/Kmeans._get_cluster_idx/original