Skip to main content
# PyNormaliz - An interface to Normaliz


## What is PyNormaliz

PyNormaliz provides an interface to Normaliz (https://www.normaliz.uni-osnabrueck.de) via libNormaliz.
It offers the complete functionality of Normaliz, and can be used interactively from python. For a first example,
see [this introduction](examples/PyNormaliz_Tutorial.ipynb) by Richard Sieg.

## Requirements

* python 2.7 or higher or python 3.4 or higher
* Normaliz 3.2.1 Oor higher (https://github.com/Normaliz/Normaliz/releases)

## Installation

You need to have Normaliz properly installed and libNormaliz in your gcc's include path.
On most systems, installing Normaliz via
```
\> make install
```
is enough. If you prefer or are not able to install it, you need to set CPATH and
LD_LIBRARY_PATH accordingly.

After that, you can install PyNormaliz via
```
\> pip install PyNormaliz
```

## Usage

The main command is Cone to create a cone, and the member functions
of the cone class to compute properties. For a full list of input and output
properties, see the Normaliz manual.

To create a cone, use
```
import PyNormaliz
C := PyNormaliz.Cone( cone = [[1,0],[0,1]] )
```

All possible Normaliz input properties can be given as keyword arguments.

To compute a property of the cone, use the provided getters, which corresponds to Normaliz compute
goals.

```
C.HilbertBasis()
```

You can pass options to the compute functions
```
C.HilbertSeries( HSOP = True )
```

## Low level commands

There is also a low-level API, directly using C functions:

To create a cone, use
```
C := NmzCone( "cone", [[1,0],[0,1]] )
```
or, equivalently,
```
C := NmzCone( [ "cone", [[1,0],[0,1]] ] )
```
NmzCone can take an arbitrary number of arguments, either as separated arguments or in a list.
First is always a string, describing an input property for Normaliz, followed by a (possibly empty)
matrix.

NmzCompute takes a cone as first argument, followed by arbitrary many strings, or a list of strings,
describing Normaliz output properties. NmzCompute lets Normaliz compute the necessary values, and
returns true if everything was computed properly, false otherwise.
```
NmzCompute( C, "HilbertBasis" )
```
or
```
NmzCompute( C, [ "HilbertBasis" ] )
```

NmzIsComputed takes a cone and a string representing an output property, and returns true if the
property is already computed for the cone, false otherwise.
```
NmzIsComputed( C, "HilbertBasis" )
```

NmzResult takes a cone and a string representing an output property, and returns the computed
value of this property as a matrix, a list, or as a bool.
```
NmzResult( C, "HilbertBasis" )

Metadata

Release files for PyNormaliz 1.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 PyNormaliz 1.5
File Size Uploaded Provenance
PyNormaliz-1.5.tar.gz 16.5 kB Without provenance Details

Release files / PyNormaliz-1.5.tar.gz

Download URL PyNormaliz-1.5.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c0e0560a32e80dd1de5c573ca9c5f76940e09760a65774b871a85f018054042c
BLAKE2b-256 checksum
How to use checksums
5e8e2e4f68fb395ea834be0bdd3adf3c1787e320cbb6007e0c16ff6529480ed9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for PyNormaliz 1.5

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.

Release history Release notifications | RSS feed

This release

1.5 This release

1 release file No provenance

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