Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)

src/d/r/dragnet-HEAD/test/test_kmeans.py   dragnet(Download)
    def test_update_centers(self):
        km = kmeans.KMeans(3)
        km.fit(self.X)
        km._init_centers(self.X)
        km.update_centers(self.X, np.array([0, 1, 1, 0, 2]))