---
title: "evaLEs"
url: "https://edoardogabrielli.com/en/projects/evales"
lang: "en"
updated: "2026-11-02"
---

# evaLEs

> evaLEs: a Python package that computes the Lyapunov spectrum of a dynamical system, with Numba and NumPy.

A Python package, published on PyPI, that computes the Lyapunov spectrum of a dynamical system described by differential equations or discrete maps.

**Stack:** Python, NumPy, Numba, SciPy, Sphinx.

## Why

To tell whether a system is chaotic you look at its Lyapunov exponents, which measure how fast two nearby trajectories drift apart. Computing them in plain Python is slow. I wrote the package during my physics studies in Pisa, between July 2021 and August 2022, and published it in case it helps other students.

![Trajectory of the Lorenz system, used as an example](https://edoardogabrielli.com/media/originals/2026/11/281c0262b6ca4ccbbf545c0dd17d6dab/evales-lorenz.webp)

## How it works

### 1. The method

Benettin's method, as described by Sandri (1996), using the variational matrix.

### 2. The interface

You call computeLE with the function, its Jacobian and the initial condition. For continuous time it uses fourth-order Runge-Kutta, for maps the step of the function; a transient phase is optional. It returns the spectrum over time and the solution.

### 3. A Numba version

Next to the Python one there is a version compiled with Numba. The repository has no benchmark, so I give no figures.

### What I did

The whole package, on my own: about 300 lines of Python, 50 commits, Sphinx documentation on Read the Docs, an example notebook and automated tests on Travis CI.

### Status

Finished in August 2022. Public on GitHub, with 5 stars. I know of no real users besides myself.

[Code on GitHub](https://github.com/dodogabrie/evaLEs) · [Documentation](https://evales.readthedocs.io/en/latest/) · [Example notebook](https://nbviewer.org/github/dodogabrie/evaLEs/blob/main/docs/notebooks/HowToUse.ipynb)

[← All projects](https://edoardogabrielli.com/en/projects)