nifty.re.num.lanczos module#
- lanczos_tridiag(mat: Callable[[Array], Array], v: Array, *, order: int, tol: float = 1e-12)[source]#
Compute a Lanczos tridiagonal and its orthonormal projection matrix.
The tridiagonal matrix is of shape (order x order) and the stack of vectors has shape
(order,) + v.shape. The output is padded with zeros after an early Lanczos breakdown.