GriSPy documentation

_images/logo_mid.png PyPi Version Build Status ReadTheDocs Coverage License Python 3.6+ PyPI downloads ascl:1912.013 arxiv/1912.09585 Curso doctoral FAMAF: Diseño de software para cómputo científico

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, Alejandro Garcia, Juan B. Cabral, Marcelo Lares, Manuel Merchán.

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. (2020). GriSPy: A Python package for fixed-radius nearest neighbors search. 10.1016/j.ascom.2020.100443.


      author = {{Chalela}, M. and {Sillero}, E. and {Pereyra}, L. and {Garcia}, M.~A. and {Cabral}, J.~B. and {Lares}, M. and {Merch{\'a}n}, M.},
      title = "{GriSPy: A Python package for fixed-radius nearest neighbors search}",
      journal = {Astronomy and Computing},
   keywords = {Data mining, Nearest-neighbor search, Methods, Data analysis, Astroinformatics, Python package},
         year = 2021,
      month = jan,
      volume = {34},
         eid = {100443},
      pages = {100443},
         doi = {10.1016/j.ascom.2020.100443},
      adsurl = {},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}


Indices and tables