Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 870 Bytes

README.md

File metadata and controls

32 lines (22 loc) · 870 Bytes

fast3tree

PyPI version

This Python package is a wrapper of the excellent, lightning fast fast3tree C library, a BSP tree implementation written by Peter Behroozi. The C source code fast3tree.c was (shamlessly) taken from Peter's Rockstar halo finder.

This project and Peter's fast3tree.c are both licensed under GPLv3.

Installation

You can install from pypi:

pip install fast3tree

Example

Here's a minimal example of how you use it in your python code

import numpy as np
from fast3tree import fast3tree

data = np.random.rand(10000, 3)
with fast3tree(data) as tree:
    idx = tree.query_radius([0.5, 0.5, 0.5], 0.2)
    # do whatever you like with idx