Repository navigation
numlib 0.1.0
Dense numerical linear algebra from scratch in Python.
Install
pip install numlib-linalg==0.1.0The distribution is numlib-linalg; the import module is numlib.
import numlib
from numlib import eigen_qrThe names differ because numlib is already registered on PyPI by an unrelated
number-theory package.
Highlights
- LU with partial and complete pivoting, triangular solves and growth factor.
- QR by Householder, modified Gram-Schmidt with optional reorthogonalization,
and classical Gram-Schmidt for comparison. - SVD by one-sided Jacobi rotations.
- Real eigenvalues and right eigenvectors by Hessenberg reduction, Wilkinson
shifts, the implicit Francis double shift, inverse iteration on the real
Schur form and back transformation with the accumulated Householder matrix. - Least squares by QR and by the normal equations.
- Condition number, forward error, normwise backward error and loss of
orthogonality. - PCA from a covariance matrix, with explained variance and loadings.
- Test-matrix generators, LAPACK benchmarks, four regenerable figures and a
generated eigenvector/PCA verification report.
Documentation
README.md: usage and figures.docs/eigenvectors.md: eigenvector method, complexity and limits.docs/RESULTS.md: generated comparison withnumpy.linalg.eigand PCA.CHANGELOG.md: release notes.