Skip to main content

An iteration history printer

Project description

IterPrinter: A simple iteration history printer

When using iterative numerical algorithms it is common to print after each iteration a message so that a user can monitor convergence and catch any bugs. For example, in the demo.py file

 iter │   b - a    │    f(c)    │        a         │        b         │
──────┼────────────┼────────────┼──────────────────┼──────────────────┤
    0 │  4.000e+00 │  2.000e+00 │ 0.0000000000e+00 │ 4.0000000000e+00 │
    1 │  2.000e+00 │ -1.000e+00 │ 0.0000000000e+00 │ 2.0000000000e+00 │
    2 │  1.000e+00 │  2.500e-01 │ 1.0000000000e+00 │ 2.0000000000e+00 │
    3 │  5.000e-01 │ -4.375e-01 │ 1.0000000000e+00 │ 1.5000000000e+00 │
    4 │  2.500e-01 │ -1.094e-01 │ 1.2500000000e+00 │ 1.5000000000e+00 │
    5 │  1.250e-01 │  6.641e-02 │ 1.3750000000e+00 │ 1.5000000000e+00 │
    6 │  6.250e-02 │ -2.246e-02 │ 1.3750000000e+00 │ 1.4375000000e+00 │
    7 │  3.125e-02 │  2.173e-02 │ 1.4062500000e+00 │ 1.4375000000e+00 │
    8 │  1.562e-02 │ -4.272e-04 │ 1.4062500000e+00 │ 1.4218750000e+00 │
    9 │  7.812e-03 │  1.064e-02 │ 1.4140625000e+00 │ 1.4218750000e+00 │
   10 │  3.906e-03 │  5.100e-03 │ 1.4140625000e+00 │ 1.4179687500e+00 │
   11 │  1.953e-03 │  2.336e-03 │ 1.4140625000e+00 │ 1.4160156250e+00 │

A simple iteration history printer

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iterprinter-0.1.1.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

iterprinter-0.1.1-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file iterprinter-0.1.1.tar.gz.

File metadata

  • Download URL: iterprinter-0.1.1.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.7

File hashes

Hashes for iterprinter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2a9db4b0fc1e1df300faa9c1b3bcbea268c187c0cd7b16aa2227b36e040a1d36
MD5 b9e5a1a21ffb0da7fa0569c87dbce155
BLAKE2b-256 413f857cc44f3ef587eab033dd84a59e423ce0fc7e73b1b9eb2317bb06988c33

See more details on using hashes here.

File details

Details for the file iterprinter-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: iterprinter-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.7

File hashes

Hashes for iterprinter-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9a1ee66952a0b0328345d525314aa0862f94b08ca4bf352d692e14ae167cd4fd
MD5 417d600657cfe4147bcd4be72003d308
BLAKE2b-256 64bf49b9f1389ea911fef7f542184089540ca131c7f3e84dbfec48d3ec95d63f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page