File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1413,7 +1413,6 @@ func (vc *vectorCentroids) updateCentroids() {
14131413func (vc * vectorCentroids ) randomInit () {
14141414 vc .dimension = len (vc .centroids [0 ])
14151415 vc .numCenters = len (vc .centroids )
1416- vc .centroids = make ([][]float32 , vc .numCenters )
14171416 vc .counts = make ([]int64 , vc .numCenters )
14181417 vc .weights = make ([][]float32 , vc .numCenters )
14191418 vc .mutexs = make ([]* sync.Mutex , vc .numCenters )
@@ -1433,6 +1432,7 @@ const numCentroids = 1000
14331432func rebuildVectorIndex (ctx context.Context , factorySpecs []* tok.FactoryCreateSpec , rb * IndexRebuild ) error {
14341433 pk := x.ParsedKey {Attr : rb .Attr }
14351434 vc := & vectorCentroids {}
1435+ vc .centroids = make ([][]float32 , 0 )
14361436
14371437 MemLayerInstance .IterateDisk (ctx , IterateDiskArgs {
14381438 Prefix : pk .DataPrefix (),
You can’t perform that action at this time.
0 commit comments