Skip to main content

ophac – Order Preserving Hierarchical Agglomerative Clustering

Version: 0.5.2 Python: 3.10+

This library implements the algorithms described in the article Order-Preserving Hierarchical Clustering. It provides functionality for performing order-preserving hierarchical agglomerative clustering on partially ordered sets.

See the ophac wiki for usage examples and additional context (linked from the old Bitbucket repository).

License

This project is released under the GNU Lesser General Public License v3.0.

Requirements

ophac requires:

  • Python 3.10 or newer
  • numpy (runtime)
  • scipy is optional, and only required for plotting-related utilities

From PyPI (recommended)

Install the core package:

pip install ophac

If you want to use the optional plotting features, install with extras:

pip install ophac[plot]

Local Installation (for development)

Use a virtual environment to avoid polluting your system Python:

python -m venv venv
source venv/bin/activate
pip install -e ".[plot]"  # omit [plot] if plotting is not needed

Building from Source (for unsupported platforms)

If you're on a platform without a prebuilt wheel (e.g., unusual Linux distro or Python version), pip will try to build ophac from source.

You'll need:

  • A C++17-compatible compiler (e.g., GCC ≥ 7, Clang ≥ 5, or MSVC ≥ 2017)
  • Python development headers (e.g., python3-dev)
  • Build tools like make, cmake (if required)

Ensure pip, setuptools, and wheel are up to date:

pip install --upgrade pip setuptools wheel

Then install:

pip install ophac

If building fails, you can clone the repository and install locally:

git clone https://github.com/danielbakkelund/ophac.git
cd ophac
pip install .

Optional Plotting

Some functions provide visualization support (e.g., dendrograms). To enable these, install with the plot extra:

pip install ophac[plot]

This will install scipy as an additional dependency.

Metadata

Release files for ophac 0.5.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ophac 0.5.4
File Size Uploaded
ophac-0.5.4.tar.gz 32.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for ophac 0.5.4
File
ophac-0.5.4-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
ophac-0.5.4-cp311-cp311-win32.whl CPython 3.11 CPython 3.11 Windows x86-32 Details
ophac-0.5.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
ophac-0.5.4-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
ophac-0.5.4-cp311-cp311-macosx_10_9_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.9+ x86-64 Details
ophac-0.5.4-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
ophac-0.5.4-cp310-cp310-win32.whl CPython 3.10 CPython 3.10 Windows x86-32 Details
ophac-0.5.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
ophac-0.5.4-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
ophac-0.5.4-cp310-cp310-macosx_10_9_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64 Details

Total release size: 1.2 MB

Release files / ophac-0.5.4.tar.gz

Download URL ophac-0.5.4.tar.gz
Size 32.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3e370da1af44bfb3b3be6baccb2eaacb8fc9c3eed962deff3898fe68a88df1ed
BLAKE2b-256 checksum
How to use checksums
1f68151ced1b2dbebc3fbae4fc5a29dfd7367da23ad1005fc13b32cc7ad96a6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / ophac-0.5.4-cp311-cp311-win_amd64.whl

Download URL ophac-0.5.4-cp311-cp311-win_amd64.whl
Size 108.2 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
ff1f9f5e06bcc5f06bdd300b340e562763d27125870442224e2fffce3e1bb4eb
BLAKE2b-256 checksum
How to use checksums
912f534294f4eb2d21637f09908b50d2e89c5d511b69254afe5028cfefdaee9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / ophac-0.5.4-cp311-cp311-win32.whl

Download URL ophac-0.5.4-cp311-cp311-win32.whl
Size 100.1 kB
Tags CPython 3.11 Windows x86-32
SHA-256 checksum
How to use checksums
81a1f5cd59cbbb20895c275261cc20089fbf94507de8a513e331cb629f3c07c1
BLAKE2b-256 checksum
How to use checksums
684a96dd2c932e0211089e52f08f4280fe850d04f1ff143c11a36e065311553f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / ophac-0.5.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL ophac-0.5.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 140.3 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
6d465d95df4e48d865258ae61ef52fc62913e324cbfe5b0618add0fd1aecc123
BLAKE2b-256 checksum
How to use checksums
f5efbe0bde1cad2104865af18f08a4ec098d43a19a1b131c4d020e37dd0263ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / ophac-0.5.4-cp311-cp311-macosx_11_0_arm64.whl

Download URL ophac-0.5.4-cp311-cp311-macosx_11_0_arm64.whl
Size 106.6 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d451629a70b9ba1586f375954c23992bb66d06ede93e5a7134f4c2e4cca9c4d5
BLAKE2b-256 checksum
How to use checksums
158b07cd9c35cca0ebde84b3e43b83f70a91a706c82e8047596c9b9e1b55a627
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / ophac-0.5.4-cp311-cp311-macosx_10_9_x86_64.whl

Download URL ophac-0.5.4-cp311-cp311-macosx_10_9_x86_64.whl
Size 109.5 kB
Tags CPython 3.11 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
53df96d91b8ebd46f12e1749d303529ea7ba09ab3467387fe551042389ff58a6
BLAKE2b-256 checksum
How to use checksums
f03c161c8828d8412dd19564f9fb2a66ff6d17739c9eefada4875fed117e5f6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / ophac-0.5.4-cp310-cp310-win_amd64.whl

Download URL ophac-0.5.4-cp310-cp310-win_amd64.whl
Size 106.7 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
c790e39f54ed48f9cae69bdd697d3bfa0966f040b7a0951711be8dea30666458
BLAKE2b-256 checksum
How to use checksums
4cf60a665e196632d0086e54b784e47b1702c3b764b20f5c3da01754b6556356
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / ophac-0.5.4-cp310-cp310-win32.whl

Download URL ophac-0.5.4-cp310-cp310-win32.whl
Size 99.0 kB
Tags CPython 3.10 Windows x86-32
SHA-256 checksum
How to use checksums
f9ebcb872a514241b8fb753f8cdaac3db25a03f7ba6361391649c505308345af
BLAKE2b-256 checksum
How to use checksums
34b687495656c7e34f83da095a3c17a2a8f577005df09b103b8de895df455062
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / ophac-0.5.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL ophac-0.5.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 138.7 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
14e90257b6b6c109fd0b14784cf05860bd5744a82d586e93e1b1a4c194bbce4a
BLAKE2b-256 checksum
How to use checksums
83106effc611e1aa6f84f00764e2f82cc5fd78856cd2c993d0a2824d6055f0b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / ophac-0.5.4-cp310-cp310-macosx_11_0_arm64.whl

Download URL ophac-0.5.4-cp310-cp310-macosx_11_0_arm64.whl
Size 105.4 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
11770178736d1baaeea70fe488ded84ebd73a152822285f6fb4169a57397bd7e
BLAKE2b-256 checksum
How to use checksums
539ea6b57f8a65b8f7ea1845af53f58b1d53c1326a166c1017113105f1fd6b12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / ophac-0.5.4-cp310-cp310-macosx_10_9_x86_64.whl

Download URL ophac-0.5.4-cp310-cp310-macosx_10_9_x86_64.whl
Size 108.0 kB
Tags CPython 3.10 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
6514c364e1adb0260b1d03b3aab78e176946d020c8204267c944942f6234d9a6
BLAKE2b-256 checksum
How to use checksums
e4552a8e16f340a3d472c557fa918de543d071dc321d1e3f3e6ca9e3c35a07d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.5.4 This release

11 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.5

1 release file

0.4.4

1 release file

0.4.3

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page