Skip to main content

aitkens

Aitken's delta-squared series acceleration method

J. M. F. Tsang (j.m.f.tsang@cantab.net)


Usage

Given an object xs that can be turned into a one-dimensional numpy array, run:

from aitkens import accelerate

accelerate(xs)

Example: Iterates of $\sqrt{2}$

This example, which is given on the Wikipedia article [1], is actually a poor example since the original iterates converge quadratically, rather than linearly. The accelerated sequence's terms tend to overshoot the true values.

from itertools import accumulate
from aitkens import accelerate

iterates = list(accumulate(
    range(5), lambda x, _: 0.5 * (x + 2/x), initial=1
))
acc = accelerate(iterates)

References

  1. https://en.wikipedia.org/wiki/Aitken%27s_delta-squared_process

Licence

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

Metadata

Release files for aitkens 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aitkens 0.1.0
File Size Uploaded Provenance
aitkens-0.1.0.tar.gz 1.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aitkens 0.1.0
File Interpreter ABI Platform
aitkens-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.0 kB

Release files / aitkens-0.1.0.tar.gz

Download URL aitkens-0.1.0.tar.gz
Size 1.9 kB
Tags Source
SHA-256 checksum
How to use checksums
47afacabb07e94f7324b8cfe03d0e8e57a3fc6d6a2a7c2194f9dab7bda9f1720
BLAKE2b-256 checksum
How to use checksums
6215326f3e9ba97a4b34f8d3f8c0e85001c11f8989be6982a0b776121c97e56a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

Release files / aitkens-0.1.0-py3-none-any.whl

Download URL aitkens-0.1.0-py3-none-any.whl
Size 2.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed6a82dca5336bda6760d818d18bb5e8de61fdcdccee87187654bc6c198afd9f
BLAKE2b-256 checksum
How to use checksums
c29a870ab698a3ff7dbac982787981736d3f79f12833dd7c9aa8f690ecb130e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

Security for aitkens 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page