Python Bindings for Pressio

Leading-edge projection-based reduced order models (pROMs) for dynamical systems in science and engineering.

This is the documentation of the Python bindings library, which is one component of the Pressio project.


Note that if you get an import error, it might be that the version of pytest you are using is not compatible with the pip command you used to install. Make sure you use Python commands from the same distribution.

In a nutshell

Pressio can be applied to any dynamical system expressible in a continuous-time form as

\[ \frac{d \boldsymbol{y}}{dt} = \boldsymbol{f}(\boldsymbol{y},t; ...) \]

and/or in a discrete-time form

\[ \boldsymbol{R}(\boldsymbol{y}, \boldsymbol{y_{n-1}}, ..., t_n, dt_n; ...) = \boldsymbol{0} \]

Here, $y$ is the full-order model (FOM) state, $f$ the FOM velocity, $t$ is time, and $R$ is the residual.

This formulation is quite general and does not make any assumption on its origin: it may be derived from the spatial discretization (regardless of the discretization method) of a PDE problem, or from naturally discrete systems.

We leverage this expressive mathematical framework as a pivotal design choice to enable a minimal application programming interface (API) that is natural to dynamical systems: you choose the formulation more convenient to you, and interface your application to Pressio by creating a corresponding adapter class to expose the operators needed for the chosen formulation. In general, you don't need to support both: each one has advantages and disadvantages, and sometimes the choice is dictated directly by your native application (for example, in some cases it might be easier to directly expose the discrete-time residual).

Read this doc page to learn more about the adapter classes and see code templates.

Explore the tutorials and demos

You can find descriptions of the demos here and of the tutorials here—we will progressively add more.

cd pressio4py/demos
python3 ./<demo-subdir-name>/

License and Citation

The full license is available here.

We are working on publishing this: you can find our arXiv preprint at:


Find us on Slack: or open an issue on github.