FufPy: fast union-find in Python
Implementation of union-find (aka disjoint-set) data structure.
Currently, for performance, the structure is defined on a set
It implements the standard operations, as well as
A main use case is hierarchical clustering.
The implementation is inspired by scipy's UnionFind module, and it relies on numba for performance.
Installing
Use pip install fufpy, or pip install . from the root directory of the project.
Dependencies
This package depends on numpy and numba, which will be installed automatically when installing via pip.
Documentation
The documentation, including API, can be found here.
License
This software is published under the 3-clause BSD license.
On this page
Languages
Python100.0%
Contributors
BSD 3-Clause "New" or "Revised" License
Created February 3, 2025
Updated August 15, 2025