GriSPy: A Python package for Fixed-Radius Nearest Neighbors Search

Martin Chalela, Emanuel Sillero, Luis Pereyra, Mario Alejandro García, Juan B. Cabral +2 more
12/19/2019
astro-ph.IM

Official code: mchalela/GriSPy (41 stars, MIT, last commit 2026-08-11).

Abstract

We present a new regular grid search algorithm for quick fixed-radius nearest-neighbor lookup developed in Python. This module indexes a set of k-dimensional points in a regular grid, with optional periodic conditions, providing a fast approach for nearest neighbors queries. In this first installment we provide three types of queries: $bubble$, $shell$ and the $nth-nearest$; as well as three different metrics of interest in astronomy: the $euclidean$ and two distance functions in spherical coordinates of varying precision, $haversine$ and $Vincenty$; and the possibility of providing a custom distance function. This package results particularly useful for large datasets where a brute-force search turns impractical.

View on arXivView PDF

Code Implementations(1)

mchalela/GriSPyOfficial100%
MIT

GriSPy is a regular grid search algorithm for quick nearest-neighbor lookup.

414PythonSep 9, 20192 months agoMIT

Similar Papers

Cite this paper

@article{chalela2019grispy,
  title  = {GriSPy: A Python package for Fixed-Radius Nearest Neighbors Search},
  author = {Martin Chalela and Emanuel Sillero and Luis Pereyra and Mario Alejandro García and Juan B. Cabral and Marcelo Lares and Manuel Merchán},
  year   = {2019},
  eprint = {1912.09585},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1912.09585}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1912.09585.svg)](https://codeofpaper.com/paper/1912.09585)

Discussion