Skip to content

A Python wrapper for the lightning fast fast3tree library, a BSP tree implementation written by Peter Behroozi.

License

Notifications You must be signed in to change notification settings

yymao/fast3tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A Python wrapper for the lightning fast fast3tree library, a BSP tree implementation written by Peter Behroozi.

Topics

Resources

License

Stars

Watchers

Forks