Skip to main content

Geomin

Python library for manipulating, plotting and computing with polyhedral and ellipsoidal sets. It is a relatively thin wrapper around Pycddlib, including some utility functions for convenience.

Installation

(The following assume you have already created a Python virtual environment)

Option 1. Install directly from PyPI:

pip install geomin

This does assume some prerequisites for pycddlib have already been installed. See their documentation for more information.

Option 2. Clone the repo and from within its root, run

pip install .

Usage

Creation of polytopes

From inequalities

Use the Polyhedron.from_inequalities method to build a polyhedron $X$ from a system of linear inequalities

$$ X = { x \in \mathbb{R}^n \mid H x \le h }. $$

For example, to represent the system

$$ \begin{cases} x_1 \ge -1 \ x_2 \ge -1 \ x_1 + x_2 \le 1 \end{cases} $$

You would write

import geomin as gp
import numpy as np

H = np.vstack([-np.eye(2), np.ones((1,2))])
h = np.array([1., 1., 1.])
poly = gp.Polyhedron.from_inequalities(H, h)

From vertices

Alternatively, a polyhedron can be constructed as the convex hull of a list of vertices.

import geomin as gp
import numpy as np

verts = np.array([(0, 0), (1, 0), (0, 1)])
poly = gp.Polyhedron.from_generators(verts)

Creation of ellipsoids

An ellipsoid created as gp.Ellipsoid(Q, c) represents

$$ { x: (x - c)^\top Q (x - c) \leq 1 }. $$

The argument $c$ is optional and is assumed to be $0$ by default.

Plotting

We provide some functions for easy plotting of sets, built on Matplotlib. Check the examples folder for more.

import matplotlib.pyplot as plt

# basic usage
plot_polytope(poly)

# Or with some styling
plt.figure()

plot_polytope(
    poly,
    color="tab:green",  # base color
    alpha=0.5,          # transparency
)

plt.show()

Metadata

Release files for geomin 0.0.5

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

Source distribution (sdist)

Source distribution for geomin 0.0.5
File Size Uploaded
geomin-0.0.5.tar.gz 16.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for geomin 0.0.5
File Interpreter ABI Platform
geomin-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 33.2 kB

Release files / geomin-0.0.5.tar.gz

Download URL geomin-0.0.5.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
85cace990f2bc375e25f9dd353b02b029556cb239f75198c255fda8f44acd6bc
BLAKE2b-256 checksum
How to use checksums
841adad933d1c4fbd5e7f915d836b25674875a33835a67c85790b72778123857
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2025.

Transparency log

Release files / geomin-0.0.5-py3-none-any.whl

Download URL geomin-0.0.5-py3-none-any.whl
Size 16.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c8d4303f35d80209e2078cb5be4b040051eabf1615c1c9b42842dacdfe618887
BLAKE2b-256 checksum
How to use checksums
7b894c3a0689a459bbf6b6192d33a870863629055d7b12ebb5e3896e9bb8490d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 2, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

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