Registry / data / knot-floer-homology

knot-floer-homology

JSON →
library1.2.2pypypi✓ verified 84d ago

Python wrapper for Zoltán Szabó's HFK (Heegaard Floer Knot homology) Calculator. Computes knot Floer homology invariants including the tau invariant, epsilon invariant, and the full HFK chain complex. Current version 1.2.2, with periodic releases.

pip install knot-floer-homology
INSTALL
IMPORT
SIG · KNOT-FLOER-HOMOLOG
K
knot-floer-homology
datapythonv1.2.2
Install
1.6s avg
Import
20ms
Disk
20MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.2.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.004s · 22MB
20MB installed
● package 20MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

knot_floer_homology
import knot_floer_homology
Standard import; no common wrong pattern.

Basic usage: compute knot Floer homology for the trefoil knot over Z/2Z using snappy's Manifold.

import knot_floer_homology as kfh import snappy # Create a knot (trefoil) K = snappy.Manifold('3_1') # Compute knot Floer homology (mod 2) result = kfh.compute(K, prime=2) print("Tau:", result.tau) print("Epsilon:", result.epsilon) print("Rank of HFK:", result.hfk_rank)
kfh --version
Debug
Known issues
breakingThe fast algorithm for alternating knots was removed in v1.2 due to bug #17. All knots now use the same algorithm, which may be slower for large alternating knots.
fix
No fix needed; just aware that performance may differ from earlier versions.
affects: >=1.2
deprecatedDependency on sphereogram package was removed in v1.2.1. If you relied on sphereogram for other purposes, you need to install it separately.
fix
Install sphereogram independently if needed: pip install sphereogram
affects: >=1.2.1
gotchaInterrupting long computations with Control-C was only added in v1.1. In older versions, interrupting could leave the C++ backend in an inconsistent state.
fix
Upgrade to v1.1 or later.
affects: <1.1
gotchaThe module name uses underscores (knot_floer_homology) but the PyPI package name uses hyphens (knot-floer-homology). Import with underscores.
fix
Use import knot_floer_homology
affects: all
Errors
Common errors & fixes
knot_floer_homology has no attribute 'compute'
Incorrect import or outdated version (older API).
fix
Update to >=1.0.0 and use kfh.compute(manifold, prime=...).
OverflowError: integer overflow for prime >= 1297
Bug in version <1.1 when using large primes.
fix
Upgrade to v1.1 or later.
ModuleNotFoundError: No module named 'knot_floer_homology'
Trying to import with hyphens or not installed.
fix
Install with pip install knot-floer-homology, then import knot_floer_homology (underscores).
Upgrade
Version history
1.2.2latest on PyPI · released Jan 13, 2025
Audit
Dependencies
snappyrequiredRequired for creating links (manifold objects) from knot diagrams
sphereogramoptionalWas a dependency in older versions, removed in v1.2.1 to break circular dependency
Agent activity
8 hits · last 30 days
node
8
Resources
knot-floer-homology — pip install knot-floer-homology · libregistry