Vicinity is a lightweight nearest-neighbor retrieval library supporting multiple backends (NumPy, Faiss, HNSWlib, PyTorch, etc.) with a scikit-learn-like API. Version 0.4.4, actively maintained, with monthly releases.
pip install vicinityNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Create random 100x64 float32 array, fit a NearestNeighbors instance with NumPy backend, query nearest 5 neighbors for first 3 vectors.
Use `from vicinity import NearestNeighbors`.
Use `from vicinity import Backend`.
Ensure vectors are np.float32: `vectors = np.array(vectors, dtype=np.float32)`.
Replace `from vicinity.datasets import load_dataset` with manual dataset loading from appropriate sources.