Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yymao/fast3tree
A Python wrapper for the lightning fast fast3tree library, a BSP tree implementation written by Peter Behroozi.
https://github.com/yymao/fast3tree
bsp-tree fast3tree python tree-search
Last synced: 2 months ago
JSON representation
A Python wrapper for the lightning fast fast3tree library, a BSP tree implementation written by Peter Behroozi.
- Host: GitHub
- URL: https://github.com/yymao/fast3tree
- Owner: yymao
- License: gpl-3.0
- Created: 2020-11-19T01:02:45.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-05-22T17:05:08.000Z (8 months ago)
- Last Synced: 2024-05-22T18:06:11.942Z (8 months ago)
- Topics: bsp-tree, fast3tree, python, tree-search
- Language: C
- Homepage:
- Size: 74.2 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fast3tree
[![PyPI version](https://img.shields.io/pypi/v/fast3tree.svg)](https://pypi.python.org/pypi/fast3tree)
This Python package is a wrapper of the excellent, lightning fast `fast3tree` C library,
a BSP tree implementation written by [Peter Behroozi](http://www.peterbehroozi.com/).
The C source code `fast3tree.c` was (shamlessly) taken from Peter's
[Rockstar halo finder](https://bitbucket.org/gfcstanford/rockstar).This project and Peter's `fast3tree.c` are both licensed under GPLv3.
## Installation
You can install from pypi:
```bash
pip install fast3tree
```## Example
Here's a minimal example of how you use it in your python code
```python
import numpy as np
from fast3tree import fast3treedata = 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
```