These are Python bindings to the Parma Polyhedra Library. They were extracted from the sagemath project, in order to be used in non-sage projects. This is GPL-licensed, as is Sagemath.
To build it you need to have both the ppl and gmp libraries installed in a place where distutils can find it. Then,
python setup.py build && python setup.py install
If you have trouble, try adding the desired paths to library_dirs in setup.py as a keyword argument to the Extension constructor.
To use it, simply import the module, create a matrix of Fractions or integers, and compute the double description !
from pyparma import Polyhedron
import numpy as np
from fractions import Fraction
fractionize = np.vectorize(lambda x: Fraction(str(x)))
A = fractionize(np.random.rand(50,3))
poly = Polyhedron(hrep=A)
print poly.hrep()
Both H-representation and V-representation follow the CDD format i.e.:
H_rep = [b | A] where the polyhedron is defined by b + A x >= 0
V_rep = [t | V] where V are the stacked vertices (Horizontal vectors) and t is the type: 1 for points, 0 for rays/lines.
To run the tests, simply run:
nosetests
From the top-level directory. To run the tests, you need to have the CDD library installed. I assume that you installed the version that comes with the pycddlib bindings.
Metadata
Release files for pyparma 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pyparma-0.5.0.tar.gz | 189.9 kB | Without provenance | Details |
Release files / pyparma-0.5.0.tar.gz
| Download URL | pyparma-0.5.0.tar.gz |
|---|---|
| Size | 189.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
706b1ade797ae6c109d843bda8a2061940e0018639883af27013d574d8a64cc2
|
|
BLAKE2b-256 checksum How to use checksums |
fd805e23edfe9031dd8279e053ee3adfe03a5146df5f4407efb072ffee125843
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pyparma 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.