Observed since 20 Oct, 16:46 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A Python implementation of the AAA algorithm for rational approximation
This is a Python implementation of the AAA algorithm for rational approximation described in the paper "The AAA Algorithm for Rational Approximation" by Yuji Nakatsukasa, Olivier Sète, and Lloyd N. Trefethen, SIAM Journal on Scientific Computing 2018 40:3, A1494-A1522. (doi)
A MATLAB implementation of this algorithm is contained in Chebfun. The present Python version is a more or less direct port of the MATLAB version.
The "cleanup" feature for spurious poles and zeros is not currently implemented.
The implementation is in pure Python and requires only numpy and scipy as dependencies. Install it using pip:
pip install aaa-approx
Here's an example of how to approximate a function in the interval [0,1]:
import numpy as np
from aaa import aaa
Z = np.linspace(0.0, 1.0, 1000)
F = np.exp(Z) * np.sin(2*np.pi*Z)
r = aaa(F, Z, mmax=10)
Instead of the maximum number of terms mmax, it's also possible to specify
the error tolerance tol. Both arguments work exactly as in the MATLAB
version.
The returned object r is an instance of the class aaa.BarycentricRational and can
be called like a function. For instance, you can compute the error on Z like this:
err = F - r(Z)
print(np.linalg.norm(err, np.inf))
If you are interested in the poles and residues of the computed rational function, you can query them like
pol,res = r.polres()
and the zeroes using
zer = r.zeros()
Finally, the nodes, values and weights used for interpolation (called zj, fj
and wj in the original implementation) can be accessed as properties:
r.nodes
r.values
r.weights
pypistats · 55 observations shown. Missing days are unknown. Source category: overall: without mirrors.
| Date / source period | Value | Observed at |
|---|---|---|
| 2026-10-19 – 2026-10-19 | 1 | 2026-10-20T19:39:26.6407797Z |
| 2026-10-17 – 2026-10-17 | 2 | 2026-10-20T19:39:26.6407797Z |
| 2026-10-16 – 2026-10-16 | 2 | 2026-10-20T19:39:26.6407797Z |
| 2026-10-13 – 2026-10-13 | 1 | 2026-10-20T19:39:26.6407797Z |
| 2026-10-12 – 2026-10-12 | 1 | 2026-10-20T19:39:26.6407797Z |
| 2026-10-10 – 2026-10-10 | 3 | 2026-10-20T19:39:26.6407797Z |
| 2026-10-09 – 2026-10-09 | 2 | 2026-10-20T19:39:26.6407797Z |
| 2026-10-08 – 2026-10-08 | 6 | 2026-10-20T19:39:26.6407797Z |
| 2026-10-07 – 2026-10-07 | 1 | 2026-10-20T19:39:26.6407797Z |
| 2026-10-06 – 2026-10-06 | 2 | 2026-10-20T19:39:26.6407797Z |
| 2026-10-05 – 2026-10-05 | 1 | 2026-10-20T19:39:26.6407797Z |
| 2026-10-01 – 2026-10-01 | 4 | 2026-10-20T19:39:26.6407797Z |
| 2026-09-30 – 2026-09-30 | 2 | 2026-10-20T19:39:26.6407797Z |
| 2026-09-28 – 2026-09-28 | 3 | 2026-10-20T19:39:26.6407797Z |
| 2026-09-27 – 2026-09-27 | 4 | 2026-10-20T19:39:26.6407797Z |
| 2026-09-26 – 2026-09-26 | 2 | 2026-10-20T19:39:26.6407797Z |
| 2026-09-25 – 2026-09-25 | 1 | 2026-10-20T19:39:26.6407797Z |
| 2026-09-24 – 2026-09-24 | 3 | 2026-10-20T19:39:26.6407797Z |
| 2026-09-23 – 2026-09-23 | 1 | 2026-10-20T19:39:26.6407797Z |
| 2026-09-22 – 2026-09-22 | 1 | 2026-10-20T19:39:26.6407797Z |
| 2026-09-21 – 2026-09-21 | 2 | 2026-10-20T19:39:26.6407797Z |
| 2026-09-13 – 2026-09-13 | 1 | 2026-10-20T19:39:26.6407797Z |
| 2026-09-12 – 2026-09-12 | 2 | 2026-10-20T19:39:26.6407797Z |
| 2026-09-11 – 2026-09-11 | 1 | 2026-10-20T19:39:26.6407797Z |
| 2026-09-10 – 2026-09-10 | 1 | 2026-10-20T19:39:26.6407797Z |
| 2026-09-09 – 2026-09-09 | 3 | 2026-10-20T19:39:26.6407797Z |
| 2026-09-07 – 2026-09-07 | 1 | 2026-10-20T19:39:26.6407797Z |
| 2026-09-06 – 2026-09-06 | 4 | 2026-10-20T19:39:26.6407797Z |
| 2026-09-05 – 2026-09-05 | 4 | 2026-10-20T19:39:26.6407797Z |
| 2026-09-04 – 2026-09-04 | 1 | 2026-10-20T19:39:26.6407797Z |
| 2026-09-03 – 2026-09-03 | 3 | 2026-10-20T19:39:26.6407797Z |
| 2026-09-01 – 2026-09-01 | 4 | 2026-10-20T19:39:26.6407797Z |
| 2026-08-31 – 2026-08-31 | 3 | 2026-10-20T19:39:26.6407797Z |
| 2026-08-24 – 2026-08-24 | 12 | 2026-10-20T19:39:26.6407797Z |
| 2026-08-23 – 2026-08-23 | 4 | 2026-10-20T19:39:26.6407797Z |
| 2026-08-20 – 2026-08-20 | 2 | 2026-10-20T19:39:26.6407797Z |
| 2026-08-18 – 2026-08-18 | 36 | 2026-10-20T19:39:26.6407797Z |
| 2026-08-17 – 2026-08-17 | 8 | 2026-10-20T19:39:26.6407797Z |
| 2026-08-16 – 2026-08-16 | 16 | 2026-10-20T19:39:26.6407797Z |
| 2026-08-14 – 2026-08-14 | 7 | 2026-10-20T19:39:26.6407797Z |
| 2026-08-13 – 2026-08-13 | 2 | 2026-10-20T19:39:26.6407797Z |
| 2026-08-11 – 2026-08-11 | 2 | 2026-10-20T19:39:26.6407797Z |
| 2026-08-09 – 2026-08-09 | 3 | 2026-10-20T19:39:26.6407797Z |
| 2026-08-06 – 2026-08-06 | 1 | 2026-10-20T19:39:26.6407797Z |
| 2026-08-05 – 2026-08-05 | 2 | 2026-10-20T19:39:26.6407797Z |
| 2026-08-04 – 2026-08-04 | 5 | 2026-10-20T19:39:26.6407797Z |
| 2026-08-03 – 2026-08-03 | 13 | 2026-10-20T19:39:26.6407797Z |
| 2026-08-02 – 2026-08-02 | 3 | 2026-10-20T19:39:26.6407797Z |
| 2026-08-01 – 2026-08-01 | 1 | 2026-10-20T19:39:26.6407797Z |
| 2026-07-31 – 2026-07-31 | 7 | 2026-10-20T19:39:26.6407797Z |
| 2026-07-29 – 2026-07-29 | 14 | 2026-10-20T19:39:26.6407797Z |
| 2026-07-27 – 2026-07-27 | 2 | 2026-10-20T19:39:26.6407797Z |
| 2026-07-24 – 2026-07-24 | 1 | 2026-10-20T19:39:26.6407797Z |
| 2026-07-23 – 2026-07-23 | 2 | 2026-10-20T19:39:26.6407797Z |
| 2026-07-22 – 2026-07-22 | 2 | 2026-10-20T19:39:26.6407797Z |
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.2 | 31 Jan 2019 | 2 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 16:46 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:21ef5f052bc75fc0825e2651d09a07c8e1e677ee3dd9247b804adfdd608234a9