Examples

Executed notebooks. Each runs locally or in Google Colab, where its first cell installs piazzi from GitHub. To run them locally:

uv sync --group notebooks
uv run jupyter lab notebooks/

Notebook

Description

Robust nonlinear regression

The SciPy Cookbook robust regression example with piazzi.least_squares() and L-BFGS: robust losses (Huber, soft L1, Cauchy, arctan, custom), checked against scipy.optimize.least_squares().

Open In Colab

The Rosenbrock function

The classic test problem, after the Ceres gradient tutorial and the pytorch-minimize example: piazzi’s and PyTorch’s L-BFGS on the scalar function versus Gauss-Newton and Levenberg-Marquardt on its residuals, compared with SciPy’s methods, plus the N-dimensional version and float32.

Open In Colab

Bundle adjustment

The SciPy Cookbook bundle adjustment example (49 cameras, 7776 points), with camera poses on SE(3), autodiff Jacobians through the manifold, sparse normal equations, and two linear solvers (CG and a Schur complement), on the CPU and in float32 on a GPU.

Open In Colab