Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

A Python library for large-scale exact nearest neighbor search using Buffer k-d Trees (bufferkdtree).

Project description


The bufferkdtree library is a Python library that aims at accelerating nearest neighbor computations using both k-d trees and many-core devices (e.g., GPUs) via the OpenCL framework.

The buffer k-d tree technique can be seen as an intermediate version between a standard parallel k-d tree traversal and massively-parallel brute-force implementations for nearest neigbhor search. The implementation is well-suited for data sets with a large reference set (e.g., 1,000,000 points) and a huge query set (e.g., 10,000,000 points) with a moderate-sized feature space (e.g., from d=5 to d=25).


See the documentation for details and examples.


The package can be installed via pip via:

pip install bufferkdtree

To install the package from the sources, get the current version via:

git clone

To install the package locally on a Linux system, use:

python install --user

On Debian/Ubuntu systems, the package can be installed globally for all users via:

python build
sudo python install

To run the tests, type nosetests -v bufferkdtree from outside the source directory.


The bufferkdtree package is tested under Python 2.6 and Python 2.7. The required Python dependencies are:

  • NumPy >= 1.6.1

and a working C/C++ compiler. Further, Swig and OpenCL need to be installed. See the documentation for more details.


The source code is published under the GNU General Public License (GPLv2). The authors are not responsible for any implications that stem from the use of this software.

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 bufferkdtree, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size bufferkdtree-1.0.2.tar.gz (99.5 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