Registry / data / passagemath-cddlib

passagemath-cddlib

JSON →
library10.8.4pypypiunverified

Python binding for cddlib, implementing double description method for convex polyhedra (V- and H-representation). Part of the passagemath ecosystem. Current version 10.8.4, requires Python >=3.11 <3.15. Release cadence is irregular, following the passagemath umbrella releases.

pip install passagemath-cddlib
INSTALL
IMPORT
SIG · PASSAGEMATH-CDDLIB
P
passagemath-cddlib
datapythonv10.8.4
Install
2.4s avg
Import
Disk
21MB
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 · 23.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.4s · import 0.000s · 24MB
21MB installed
● package 21MB
Code
Verified usage

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

cdd
from passagemath_cddlib import cdd
from passagemath.cddlib import cdd

Create a polyhedron from V-representation and print its H-representation. Uses the cddlib matrix convention.

from passagemath.cddlib import cdd import os # Create a polytope from H-representation (inequalities) # Example: nonnegative orthant in 2D mat = [ [1.0, 0.0], # 1*x >= 0? Actually line: 1*x + 0*y >= 0 [0.0, 1.0], # 0*x + 1*y >= 0 ] lin = [1, 1] # all inequalities are linear (not inequalities but equalities? use linearity) # Actually define inequalities: x >= 0, y >= 0 # But cdd uses row major: each row is [b, -A] # For standard form Ax <= b, we need to convert. # Let's use a simpler example: simplex # Represent the triangle with vertices (0,0), (1,0), (0,1) in V-rep V = cdd.matrix_from_array([ [0, 0, 1], # (0,0) with 1 for inhomogeneous [1, 0, 1], [0, 1, 1] ]) V.rep_type = cdd.RepType.GENERATOR poly = cdd.Polyhedron(V) # Check H-representation H = poly.get_inequalities() print('H-representation:') print(H.array)
Debug
Known issues
gotchaThe cddlib library uses a non-standard matrix format: each row is [b, -A] for inequality Ax + b >= 0. Use cdd.matrix_from_array() and set rep_type. For H-representation each row is [constant, -coefficients].
fix
Always consult the renorm module or carefully convert your inequalities to the cdd format. Use the matrix_from_array helper and manually set rep_type.
affects: all
gotchaThe passagemath ecosystem may conflict with the standalone 'cdd' package if installed. Both provide a 'cdd' module, but passagemath-cddlib uses a namespaced import.
fix
Do not install both 'cdd' and 'passagemath-cddlib' in the same environment. Use only 'passagemath-cddlib' and import from 'passagemath.cddlib.cdd'.
affects: all
deprecatedOlder versions (<10.0) used the package 'cdd' directly, but that package is now separate and unmaintained. Migrate to 'passagemath-cddlib' for updates.
fix
Uninstall 'cdd' and install 'passagemath-cddlib'. Change imports to 'from passagemath.cddlib import cdd'.
affects: <10.0
Upgrade
Version history
10.8.4latest on PyPI · released Apr 20, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources