In the section std::vector to/from np.array, index.xb is used but this attribute no longer exists.
A newer example using index.get_xb() works (facebookresearch/faiss#2266 (comment))
However I'm not clear why the 2nd parameter to faiss.rev_swig_ptr can be any number. It looks like gibberish values after n * d meaningful vector values are seen in the first n * d array positions.
In the section
std::vector to/from np.array, index.xb is used but this attribute no longer exists.A newer example using
index.get_xb()works (facebookresearch/faiss#2266 (comment))However I'm not clear why the 2nd parameter to
faiss.rev_swig_ptrcan be any number. It looks like gibberish values after n * d meaningful vector values are seen in the first n * d array positions.