Returns the index of the closest centroid to the sample

def _closest_centroid(self, x):
        """Returns the index of the closest centroid to the sample
        """
        closest_centroid = 0
        distance = 10^9

        for i in range(self.n_clusters):
            current_distance = linalg.norm(x - self.centroids[i])
            if current_distance < distance:
                closest_centroid = i
                distance = current_distance

        return closest_centroid