Skip to main content

Grid Search in Python

Project description

GriSPy (Grid Search in Python)


PyPi Version Build Status Documentation Status Coverage Status License: MIT Python 3.6+ ascl:1912.013

GriSPy 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.

GriSPy has the following queries implemented:

  • bubble_neighbors: find neighbors within a given radius. A different radius for each centre can be provided.
  • shell_neighbors: find neighbors within given lower and upper radius. Different lower and upper radius can be provided for each centre.
  • nearest_neighbors: find the nth nearest neighbors for each centre.

And the following method is available:

  • set_periodicity: define the periodicity conditions.


You need Python 3.6 or later to run GriSPy. You can have multiple Python versions (2.x and 3.x) installed on the same system without problems.

Standard Installation

GriSPy is available at PyPI. You can install it via the pip command

    $ pip install grispy

Development Install

Clone this repo and then inside the local directory execute

    $ pip install -e .


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},



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

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for grispy, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size grispy-0.0.4.tar.gz (18.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page