GriSPy documentation

_images/logo_mid.png PyPi Version Build Status License Python 3.6+ ascl:1912.013

GriSPy (Grid Search in Python) is a regular grid search algorithm for quick nearest-neighbor lookup.

This class indexes a set of k-dimensional points in a regular grid providing a fast aproach for nearest neighbors queries. Optional periodic boundary conditions can be provided for each axis individually. Additionally GriSPy provides the posibility of working with individual search radius for each query point in fixed-radius searches and minimum and maximum search radius for shell queries.

Martin Chalela (E-mail:,
Emanuel Sillero, Luis Pereyra and Alejandro Garcia

Repository and Issues


If you use GriSPy in a scientific publication, we would appreciate citations to the following paper:

Chalela, M., Sillero, E., Pereyra, L., García, M. A., Cabral, J. B., Lares, M., & Merchán, M. (2019). GriSPy: A Python package for Fixed-Radius Nearest Neighbors Search. arXiv preprint arXiv:1912.09585.


  title={GriSPy: A Python package for Fixed-Radius Nearest Neighbors Search},
    Chalela, Martin and Sillero, Emanuel and Pereyra,
    Luis and Garc{\'\i}a, Mario Alejandro and Cabral,
    Juan B and Lares, Marcelo and Merch{\'a}n, Manuel},
  journal={arXiv preprint arXiv:1912.09585},


Indices and tables