Paper¶
ChebPy — Computing with Functions via Chebyshev Approximation in Python
A single self-contained document describing what ChebPy is, the mathematics it rests on, the numerical kernels that implement it, and the object model that organises them. It is the reference to read end-to-end; the User Guide and API Reference are the reference to look things up in.
Download the PDF Read the LaTeX source
Abstract¶
ChebPy is a Python library for numerical computing with functions rather than
numbers. A smooth function is replaced by a polynomial interpolant through
Chebyshev points, accurate to close to machine precision, and thereafter
differentiation, integration, rootfinding, convolution and ordinary arithmetic
are carried out on that surrogate. The result is a system in which f + g,
f.diff() and f.roots() mean what a mathematician expects them to mean. The
paper describes the mathematical foundation, the numerical kernels that
implement it, the two-hierarchy object model that organises them, the extensions
that carry the idea beyond smooth functions on bounded intervals — Fourier
technology for periodic functions, support truncation for infinite intervals and
endpoint-clustering maps for branch singularities — and the higher-level
applications built on top. ChebPy is a Python descendant of the MATLAB package
Chebfun, and follows its algorithmic choices closely while departing from them
where a different design suits the host language better.
What is inside¶
| Section | Subject | Related pages |
|---|---|---|
| Chebyshev approximation | Chebyshev series, coefficient decay, interpolation | Approximation |
| The numerical kernels | DCT, standard_chop, adaptive construction, Clenshaw evaluation, calculus, rootfinding, Legendre conversion |
Calculus, Root-Finding, Fast Convolution |
| Architecture | The two runtime hierarchies, import layering, the piecewise container, the public surface | Architecture |
| Beyond smooth functions | Trigtech, CompactFun, Singfun |
Periodic Functions, Infinite Intervals, Endpoint Singularities |
| Applications | Quasimatrices, Gaussian process regression | Quasimatrix Algebra, Gaussian Processes |
Read it here¶
Building it yourself¶
The PDF committed alongside this page is the artifact the book ships, because
the book build has no LaTeX toolchain. To rebuild it from
docs/paper/chebpy.tex:
make paper # latexmk -pdf -bibtex; writes docs/paper/chebpy.pdf
make paper-clean # drop latexmk build artifacts
make paper needs a LaTeX distribution (TeX Live, MacTeX) on PATH. Commit the
regenerated docs/paper/chebpy.pdf whenever the source changes, so the
published book and the source stay in step. The
(RHIZA) PAPER
workflow also compiles it on every change under docs/paper/ and uploads the
result as a downloadable run artifact.