Skip to content

Commit b4edc28

Browse files
committed
Fix AttributeError: 'hnswlib.Index' object has no attribute 'get_max_elements'
1 parent 368bf40 commit b4edc28

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

python_bindings/bindings.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,7 @@ PYBIND11_PLUGIN(hnswlib) {
670670
.def("load_index", &Index<float>::loadIndex, py::arg("path_to_index"), py::arg("max_elements")=0)
671671
.def("mark_deleted", &Index<float>::markDeleted, py::arg("label"))
672672
.def("resize_index", &Index<float>::resizeIndex, py::arg("new_size"))
673+
.def("get_max_elements", &Index<float>::getMaxElements)
673674
.def_readonly("space", &Index<float>::space_name)
674675
.def_readonly("dim", &Index<float>::dim)
675676
.def_readwrite("num_threads", &Index<float>::num_threads_default)

0 commit comments

Comments
 (0)