Registry / ai-ml / passagemath-homfly

passagemath-homfly

JSON →
library10.8.4pypypiunverified

passagemath-homfly provides computation of Homfly polynomials for knots and links using libhomfly, integrated with the passagemath ecosystem. Current version 10.8.4, requiring Python ≥3.11 and <3.15. Follows passagemath release cadence; stable maintenance.

pip install passagemath-homfly
INSTALL
IMPORT
SIG · PASSAGEMATH-HOMFLY
P
passagemath-homfly
ai-mlpythonv10.8.4
Install
2.4s avg
Import
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v10.6.48 · 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
installs and imports cleanly · install 0.0s · import 0.000s · 19.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.4s · import 0.000s · 20MB
18MB installed
● package 18MB
Code
Verified usage

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

link_homfly_polynomial
from passagemath_homfly import link_homfly_polynomial
from passagemath_homfly import link_homfly_polynomial

Compute the Homfly polynomial of a trefoil knot. Requires SageMath environment.

from sage.knots.knot import Knot from passagemath.homfly import link_homfly_polynomial # Create a trefoil knot (3_1) trefoil = Knot('3_1') # Compute Homfly polynomial poly = link_homfly_polynomial(trefoil) print(poly)
Debug
Known issues
deprecatedDirect import from 'passagemath.homfly' may be deprecated in future releases. Use full import path as shown in quickstart.
fix
Always use 'from passagemath.homfly import link_homfly_polynomial'
affects: >=10.8
gotchaKnot/link must be a SageMath Knot or Link object, not a string. Common mistake: passing a knot name as string directly.
fix
Wrap knot name in Knot('3_1') or Link().
affects: all
breakingPython 3.11+ required. Versions prior to 10.8 may fail on Python 3.12+ due to C library incompatibility.
fix
Upgrade to 10.8.4 and use Python 3.11-3.14.
affects: <10.8
Upgrade
Version history
10.8.4latest on PyPI · released Apr 20, 2026
Audit
Dependencies
passagemath-sagerequiredRequired for SageMath/Python integration and knot/link data structures
libhomflyrequiredCore library for Homfly polynomial computation (installed automatically on most systems, but may need separate system install on macOS/Linux)
Agent activity
19 hits · last 30 days
node
18
Resources
passagemath-homfly — pip install passagemath-homfly · libregistry