Skip to main content

Akima Interpolation

Project description

Akima is a Python library that implements Akima’s interpolation method described in:

A new method of interpolation and smooth curve fitting based on local procedures. Hiroshi Akima, J. ACM, October 1970, 17(4), 589-602.

A continuously differentiable sub-spline is built from piecewise cubic polynomials. It passes through the given data points and will appear smooth and natural.

This module is no longer being actively developed. Consider using scipy.interpolate.Akima1DInterpolator instead.

Author:

Christoph Gohlke

License:

BSD 3-Clause

Version:

2024.5.24

Quickstart

Install the akima package and all dependencies from the Python Package Index:

python -m pip install -U akima

See Examples for using the programming interface.

Source code, examples, and support are available on GitHub.

Requirements

This revision was tested with the following requirements and dependencies (other versions may work):

Revisions

2024.5.24

  • Fix docstring examples not correctly rendered on GitHub.

  • Support NumPy 2.

2024.1.6

  • Add type hints.

  • Remove support for Python 3.8 and numpy 1.22 (NEP 29).

2022.9.12

  • Remove support for Python 3.7 (NEP 29).

  • Update metadata.

Examples

>>> import numpy
>>> from matplotlib import pyplot
>>> from scipy.interpolate import Akima1DInterpolator
>>> def example():
...     '''Plot interpolated Gaussian noise.'''
...     x = numpy.sort(numpy.random.random(10) * 100)
...     y = numpy.random.normal(0.0, 0.1, size=len(x))
...     x2 = numpy.arange(x[0], x[-1], 0.05)
...     y2 = interpolate(x, y, x2)
...     y3 = Akima1DInterpolator(x, y)(x2)
...     pyplot.title('Akima interpolation of Gaussian noise')
...     pyplot.plot(x2, y2, 'r-', label='akima')
...     pyplot.plot(x2, y3, 'b:', label='scipy', linewidth=2.5)
...     pyplot.plot(x, y, 'go', label='data')
...     pyplot.legend()
...     pyplot.show()
...
>>> example()

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

akima-2024.5.24.tar.gz (10.6 kB view hashes)

Uploaded Source

Built Distributions

akima-2024.5.24-cp312-cp312-win_arm64.whl (14.7 kB view hashes)

Uploaded CPython 3.12 Windows ARM64

akima-2024.5.24-cp312-cp312-win_amd64.whl (15.9 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

akima-2024.5.24-cp312-cp312-win32.whl (15.0 kB view hashes)

Uploaded CPython 3.12 Windows x86

akima-2024.5.24-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (33.6 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

akima-2024.5.24-cp312-cp312-macosx_11_0_arm64.whl (13.5 kB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

akima-2024.5.24-cp312-cp312-macosx_10_9_x86_64.whl (13.4 kB view hashes)

Uploaded CPython 3.12 macOS 10.9+ x86-64

akima-2024.5.24-cp311-cp311-win_arm64.whl (14.6 kB view hashes)

Uploaded CPython 3.11 Windows ARM64

akima-2024.5.24-cp311-cp311-win_amd64.whl (15.8 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

akima-2024.5.24-cp311-cp311-win32.whl (14.9 kB view hashes)

Uploaded CPython 3.11 Windows x86

akima-2024.5.24-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (32.6 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

akima-2024.5.24-cp311-cp311-macosx_11_0_arm64.whl (13.5 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

akima-2024.5.24-cp311-cp311-macosx_10_9_x86_64.whl (13.3 kB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

akima-2024.5.24-cp310-cp310-win_amd64.whl (15.8 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

akima-2024.5.24-cp310-cp310-win32.whl (14.9 kB view hashes)

Uploaded CPython 3.10 Windows x86

akima-2024.5.24-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (32.5 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

akima-2024.5.24-cp310-cp310-macosx_11_0_arm64.whl (13.5 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

akima-2024.5.24-cp310-cp310-macosx_10_9_x86_64.whl (13.3 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

akima-2024.5.24-cp39-cp39-win_amd64.whl (15.8 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

akima-2024.5.24-cp39-cp39-win32.whl (14.9 kB view hashes)

Uploaded CPython 3.9 Windows x86

akima-2024.5.24-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (32.2 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

akima-2024.5.24-cp39-cp39-macosx_11_0_arm64.whl (13.5 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

akima-2024.5.24-cp39-cp39-macosx_10_9_x86_64.whl (13.3 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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