Skip to content

Missing call to addPoint for python bindings? #8

@theolivenbaum

Description

@theolivenbaum

@yurymalkov Awesome code, really enjoying it compared to the other similar libraries.

Just one remark I noticed here, it seems that the python bindings provided are not actually adding any vector to the index - there is no call to addPoint on the code:

if(normalize==false) {
    ParallelFor(start, rows, num_threads, [&](size_t row, size_t threadId) {
        size_t id = ids.size() ? ids.at(row) : (cur_l+row);
    });
} else{
    std::vector<float> norm_array(num_threads * dim);
    ParallelFor(start, rows, num_threads, [&](size_t row, size_t threadId) {
        // normalize vector:
        size_t start_idx = threadId * dim;
        normalize_vector((float *) items.data(row), (norm_array.data()+start_idx));

        size_t id = ids.size() ? ids.at(row) : (cur_l+row);
    });
};


Also, one question. Is the library supposed to be thread safe for adding new items? Or just for performing search?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions