fastcluster
Fast hierarchical clustering routines for R and Python.
Decision gist · record as of 2026-08-14
Yes, if you need hierarchical clustering and scipy's performance is insufficient. The package is stable, has no known vulnerabilities, and offers a straightforward scipy-compatible API. The aging maintenance status is not a concern given the author's stated design philosophy (infrequent updates by design). Verify scipy version compatibility using the documented pairings to avoid distance function mismatches.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires numpy; C++ compilation needed if prebuilt wheel unavailable for your platform.
- Medium install friction due to compiled C++ components; prebuilt wheels available for Python 3.10–3.13 on macOS, Linux, and Windows.
- Package marked as aging (465 days since last release), but described as stable with infrequent updates by design rather than abandonment.
License · maintenance · safety
BSD-2-clause OR GPL-2.0-or-later (copyleft) — Dual-licensed under BSD-2-clause OR GPL-2.0-or-later (copyleft). Users must comply with one of these licenses; GPL-2.0-or-later imposes source-sharing obligations if distributed.
last release 2025-05-06 (465 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 116,614 downloads/mo, #12,198 on PyPI
Alternatives
Verify before relying
import numpy as np
from fastcluster import linkage
X = np.random.rand(10, 5)
Z = linkage(X, method='ward')- Actual performance gains over scipy.cluster.hierarchy in typical workloads.
- Compatibility with scipy versions outside the documented pairings.
- Whether the package maintainer actively monitors bug reports at daniel@danifold.net or GitHub.
What it is and what it does
fastcluster is a Python library for hierarchical agglomerative clustering that reimplements scipy.cluster.hierarchy functions (linkage, single, complete, average, weighted, centroid, median, ward) with faster C++ algorithms. It accepts either distance matrices or raw vector data and generates hierarchical clusters represented as dendrograms. The interface mirrors MATLAB's Statistics Toolbox to ease code porting.
The package is a stable, mature tool designed as a drop-in replacement for scipy when speed matters. It depends only on numpy and requires Python 3 or later. Recent versions track scipy's distance function definitions—notably the Jaccard and Yule distance changes in version 1.3.0—so version pairing with scipy is recommended to avoid inconsistencies.
Use it for
- Cluster datasets faster than scipy.cluster.hierarchy when hierarchical agglomerative methods are needed.
- Generate dendrograms from distance matrices or vector data for exploratory data analysis.
- Port MATLAB clustering code to Python with minimal API changes.
- Memory-efficient clustering of vector data via the linkage_vector function.
- Perform bioinformatics clustering where hierarchical methods are standard.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need hierarchical clustering and scipy's performance is insufficient.
The package is stable, has no known vulnerabilities, and offers a straightforward scipy-compatible API. The aging maintenance status is not a concern given the author's stated design philosophy (infrequent updates by design). Verify scipy version compatibility using the documented pairings to avoid distance function mismatches.
Install
fastcluster on PyPI
Before you install
Medium install friction due to compiled C++ components; prebuilt wheels available for Python 3.10–3.13 on macOS, Linux, and Windows. Package marked as aging (465 days since last release), but described as stable with infrequent updates by design rather than abandonment.
Requires numpy; C++ compilation needed if prebuilt wheel unavailable for your platform.
License in practice
Dual-licensed under BSD-2-clause OR GPL-2.0-or-later (copyleft). Users must comply with one of these licenses; GPL-2.0-or-later imposes source-sharing obligations if distributed.
Quickstart
import numpy as np
from fastcluster import linkage
X = np.random.rand(10, 5)
Z = linkage(X, method='ward')
Verify before relying
- Actual performance gains over scipy.cluster.hierarchy in typical workloads.
- Compatibility with scipy versions outside the documented pairings.
- Whether the package maintainer actively monitors bug reports at daniel@danifold.net or GitHub.
Package facts
| License | BSD-2-clause OR GPL-2.0-or-later copyleft |
| Python support | Supports the current Python release >=3 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Aging 465 days since the last release |
| First released | |
| Downloads | 116,614 / month, #12,198 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseLicense :: OSI Approved :: GNU General Public License v2 (GPLv2)Operating System :: OS IndependentProgramming Language :: C++Programming Language :: PythonProgramming Language :: Python :: 3Topic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: Bio-InformaticsTopic :: Scientific/Engineering :: Information AnalysisTopic :: Scientific/Engineering :: Mathematics |
Evidence: fastcluster-1.3.0-cp310-cp310-macosx_10_9_universal2.whl; fastcluster-1.3.0-cp310-cp310-macosx_10_9_x86_64.whl; fastcluster-1.3.0-cp310-cp310-macosx_11_0_arm64.whl; fastcluster-1.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; fastcluster-1.3.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl; fastcluster-1.3.0-cp310-cp310-win_amd64.whl; fastcluster-1.3.0-cp311-cp311-macosx_10_9_universal2.whl; fastcluster-1.3.0-cp311-cp311-macosx_10_9_x86_64.whl; fastcluster-1.3.0-cp311-cp311-macosx_11_0_arm64.whl; fastcluster-1.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; fastcluster-1.3.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl; fastcluster-1.3.0-cp311-cp311-win_amd64.whl; fastcluster-1.3.0-cp312-cp312-macosx_10_13_universal2.whl; fastcluster-1.3.0-cp312-cp312-macosx_10_13_x86_64.whl; fastcluster-1.3.0-cp312-cp312-macosx_11_0_arm64.whl; fastcluster-1.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; fastcluster-1.3.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl; fastcluster-1.3.0-cp312-cp312-win_amd64.whl; fastcluster-1.3.0-cp313-cp313-macosx_10_13_universal2.whl; fastcluster-1.3.0-cp313-cp313-macosx_10_13_x86_64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “hierarchical clustering”
- fastclusterPerforms fast hierarchical agglomerative clustering from distance…
- hdbscanHDBSCAN performs hierarchical density-based clustering that…
- dtaidistanceComputes distance measures between time series using Dynamic Time…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also hdbscan · scikit-fuzzy · libcuvs-cu12 · cuvs-cu12 · pyspark-hnsw · crick · faiss-gpu · kmodes · scikit-learn · k-means-constrained