taylorize
Lazy truncated Taylor series for higher-order automatic differentiation and arbitrary-precision Taylor-method ODE integration.
taylorize represents a smooth function by its normalized Taylor coefficients
c[k] = x^(k)(0) / k! and computes them lazily, so you can build an
expression once and then ask for any order afterwards.
Status: 0.0.1 (pre-alpha seed). The API is minimal and will change.
Install
pip install taylorize
Quickstart
from taylorize import derivative, taylor_series, exp, sin, ode_step
def f(x):
return exp(sin(x))
# 5th derivative of exp(sin(x)) at 0
print(derivative(f, k=5)(0.0)) # -8.0
# Taylor coefficients of sin(x)
print(taylor_series(sin, order=9)(0.0)) # [0, 1, 0, -1/6, ...]
# One 16th-order Taylor step of the simple pendulum
def pendulum(u):
theta, omega = u[0], u[1]
return [omega, -sin(theta)]
step = ode_step(pendulum, order=16)
print(step([1.0, 0.0], 0.1))
See examples/basic.py.
Idea
The core object is a truncated power series in a nilpotent direction h:
x(h) = c[0] + c[1] h + c[2] h^2 + ... + c[N] h^N
Every elementary function is just a recurrence on these coefficients
(e.g. exp: c[k] = (1/k) * sum(j * x[j] * c[k-j])), and the chain rule turns
any composition into ring operations on series. The same machinery integrates
ODEs one Taylor step at a time.
Roadmap
- Backend-agnostic coefficients (
math,numpy,mpmath,torch,jax,sympy) - Automatic interception of
math.*/np.*/torch.*/sp.* - Functions defined by ODEs (
from_ode) and coupled systems - Special functions (
erf, Airy, Bessel, Jacobi, ...) - Adaptive-step Taylor ODE solver
License
MIT
Metadata
Release files for taylorize 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| taylorize-0.0.1.tar.gz | 16.3 kB | With provenance | Details for taylorize-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| taylorize-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for taylorize-0.0.1-py3-none-any.whl |
Total release size: 22.7 kB
Release files / taylorize-0.0.1.tar.gz
| Download URL | taylorize-0.0.1.tar.gz |
|---|---|
| Size | 16.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
326cb6dbdf7897076162c105742c1005361be0c837216df91c1592c09363c3cd
|
|
BLAKE2b-256 checksum How to use checksums |
86c01ea23973c5a96f3c8801a5236e31ac89de9a0a9b9d118510bd275c2dc7f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logRelease files / taylorize-0.0.1-py3-none-any.whl
| Download URL | taylorize-0.0.1-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
33895ab65758bdcfae66eaee151a6c85169260b23e3abfa5a79628983fadce8c
|
|
BLAKE2b-256 checksum How to use checksums |
9ff8b0d90ea45ce868c86b50540935c4363a6a75b93d3e8720c8372ee10d4ded
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logSecurity for taylorize 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for taylorize-0.0.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.