We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79d5d74 commit 36d00bfCopy full SHA for 36d00bf
python_bindings/bindings.cpp
@@ -749,9 +749,9 @@ class BFIndex {
749
if (!normalize) {
750
alg->addPoint((void *) items.data(row), (size_t) id);
751
} else {
752
- float normalized_vector[dim];
753
- normalize_vector((float *)items.data(row), normalized_vector);
754
- alg->addPoint((void *) normalized_vector, (size_t) id);
+ std::vector<float> normalized_vector(dim);
+ normalize_vector((float *)items.data(row), normalized_vector.data());
+ alg->addPoint((void *) normalized_vector.data(), (size_t) id);
755
}
756
757
cur_l+=rows;
0 commit comments