diff --git a/src/ivfkmeans.c b/src/ivfkmeans.c index ea34a10..d0fd1ce 100644 --- a/src/ivfkmeans.c +++ b/src/ivfkmeans.c @@ -442,7 +442,7 @@ ElkanKmeans(Relation index, VectorArray samples, VectorArray centers) /* Step 7 */ for (j = 0; j < numCenters; j++) - memcpy(VectorArrayGet(centers, j), VectorArrayGet(newCenters, j), VECTOR_SIZE(dimensions)); + VectorArraySet(centers, j, VectorArrayGet(newCenters, j)); if (changes == 0 && iteration != 0) break;