########
interpax
########
|License| |DOI| |Issues| |Pypi|
|Docs| |UnitTests| |Codecov|
interpax is a library for interpolation and function approximation using JAX.
Includes methods for nearest neighbor, linear, and several cubic interpolation schemes
in 1d, 2d, and 3d, as well as Fourier interpolation for periodic functions in
1d and 2d.
Coming soon:
- Spline interpolation for rectilinear grids in N-dimensions
- RBF interpolation for unstructured data in N-dimensions
- Smoothing splines for noisy data
Installation
============
interpax is installable with `pip`:
.. code-block:: console
pip install interpax
Usage
=====
.. code-block:: python
import jax.numpy as jnp
import numpy as np
from interpax import interp1d
xp = jnp.linspace(0, 2 * np.pi, 100)
xq = jnp.linspace(0, 2 * np.pi, 10000)
f = lambda x: jnp.sin(x)
fp = f(xp)
fq = interp1d(xq, xp, fp, method="cubic")
np.testing.assert_allclose(fq, f(xq), rtol=1e-6, atol=1e-5)
For full details of various options see the `API documentation <https://interpax.readthedocs.io/en/latest/api.html>`__
.. |License| image:: https://img.shields.io/github/license/f0uriest/interpax?color=blue&logo=open-source-initiative&logoColor=white
:target: https://github.com/f0uriest/interpax/blob/master/LICENSE
:alt: License
.. |DOI| image:: https://zenodo.org/badge/706703896.svg
:target: https://zenodo.org/doi/10.5281/zenodo.10028967
:alt: DOI
.. |Docs| image:: https://img.shields.io/readthedocs/interpax?logo=Read-the-Docs
:target: https://interpax.readthedocs.io/en/latest/?badge=latest
:alt: Documentation
.. |UnitTests| image:: https://github.com/f0uriest/interpax/actions/workflows/unittest.yml/badge.svg
:target: https://github.com/f0uriest/interpax/actions/workflows/unittest.yml
:alt: UnitTests
.. |Codecov| image:: https://codecov.io/github/f0uriest/interpax/graph/badge.svg?token=MB11I7WE3I
:target: https://codecov.io/github/f0uriest/interpax
:alt: Coverage
.. |Issues| image:: https://img.shields.io/github/issues/f0uriest/interpax
:target: https://github.com/f0uriest/interpax/issues
:alt: GitHub issues
.. |Pypi| image:: https://img.shields.io/pypi/v/interpax
:target: https://pypi.org/project/interpax/
:alt: Pypi
Raw data
{
"_id": null,
"home_page": "https://github.com/f0uriest/interpax",
"name": "interpax",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "interpolation spline cubic fourier approximation",
"author": "Rory Conlin",
"author_email": "wconlin@princeton.edu",
"download_url": "https://files.pythonhosted.org/packages/a7/6e/542beac6aa11501cfaacb5386e15529373ef55202d3c39a7d984cfa5f3b2/interpax-0.3.4.tar.gz",
"platform": null,
"description": "\n########\ninterpax\n########\n|License| |DOI| |Issues| |Pypi|\n\n|Docs| |UnitTests| |Codecov|\n\ninterpax is a library for interpolation and function approximation using JAX.\n\nIncludes methods for nearest neighbor, linear, and several cubic interpolation schemes\nin 1d, 2d, and 3d, as well as Fourier interpolation for periodic functions in\n1d and 2d.\n\nComing soon:\n- Spline interpolation for rectilinear grids in N-dimensions\n- RBF interpolation for unstructured data in N-dimensions\n- Smoothing splines for noisy data\n\n\nInstallation\n============\n\ninterpax is installable with `pip`:\n\n.. code-block:: console\n\n pip install interpax\n\n\n\nUsage\n=====\n\n.. code-block:: python\n\n import jax.numpy as jnp\n import numpy as np\n from interpax import interp1d\n\n xp = jnp.linspace(0, 2 * np.pi, 100)\n xq = jnp.linspace(0, 2 * np.pi, 10000)\n f = lambda x: jnp.sin(x)\n fp = f(xp)\n\n fq = interp1d(xq, xp, fp, method=\"cubic\")\n np.testing.assert_allclose(fq, f(xq), rtol=1e-6, atol=1e-5)\n\n\nFor full details of various options see the `API documentation <https://interpax.readthedocs.io/en/latest/api.html>`__\n\n\n.. |License| image:: https://img.shields.io/github/license/f0uriest/interpax?color=blue&logo=open-source-initiative&logoColor=white\n :target: https://github.com/f0uriest/interpax/blob/master/LICENSE\n :alt: License\n\n.. |DOI| image:: https://zenodo.org/badge/706703896.svg\n :target: https://zenodo.org/doi/10.5281/zenodo.10028967\n :alt: DOI\n\n.. |Docs| image:: https://img.shields.io/readthedocs/interpax?logo=Read-the-Docs\n :target: https://interpax.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation\n\n.. |UnitTests| image:: https://github.com/f0uriest/interpax/actions/workflows/unittest.yml/badge.svg\n :target: https://github.com/f0uriest/interpax/actions/workflows/unittest.yml\n :alt: UnitTests\n\n.. |Codecov| image:: https://codecov.io/github/f0uriest/interpax/graph/badge.svg?token=MB11I7WE3I\n :target: https://codecov.io/github/f0uriest/interpax\n :alt: Coverage\n\n.. |Issues| image:: https://img.shields.io/github/issues/f0uriest/interpax\n :target: https://github.com/f0uriest/interpax/issues\n :alt: GitHub issues\n\n.. |Pypi| image:: https://img.shields.io/pypi/v/interpax\n :target: https://pypi.org/project/interpax/\n :alt: Pypi\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Interpolation and function approximation with JAX",
"version": "0.3.4",
"project_urls": {
"Contributing": "https://github.com/f0uriest/interpax/blob/master/CONTRIBUTING.rst",
"Documentation": "https://interpax.readthedocs.io/",
"Homepage": "https://github.com/f0uriest/interpax",
"Issues Tracker": "https://github.com/f0uriest/interpax/issues",
"Source Code": "https://github.com/f0uriest/interpax/"
},
"split_keywords": [
"interpolation",
"spline",
"cubic",
"fourier",
"approximation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bbdc5bf6e1b3728d6ddda7ccb7aa39d938fcd7723518bc9e671f90daca7b047f",
"md5": "b4dff34caa4f06c87cecfc8d5eaf82ff",
"sha256": "9929f693e21e196b42a496beaa94b45beb13854d77fb46d8f2653e7bfa9a95da"
},
"downloads": -1,
"filename": "interpax-0.3.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b4dff34caa4f06c87cecfc8d5eaf82ff",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 26635,
"upload_time": "2024-10-28T01:48:54",
"upload_time_iso_8601": "2024-10-28T01:48:54.174378Z",
"url": "https://files.pythonhosted.org/packages/bb/dc/5bf6e1b3728d6ddda7ccb7aa39d938fcd7723518bc9e671f90daca7b047f/interpax-0.3.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a76e542beac6aa11501cfaacb5386e15529373ef55202d3c39a7d984cfa5f3b2",
"md5": "9f13f4d5cb719c1911ed78459c8cb613",
"sha256": "04e4c032ff1629b79a059ced0f19e36084a4d03e081a4d9e51457096d3bd734d"
},
"downloads": -1,
"filename": "interpax-0.3.4.tar.gz",
"has_sig": false,
"md5_digest": "9f13f4d5cb719c1911ed78459c8cb613",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 55906,
"upload_time": "2024-10-28T01:48:56",
"upload_time_iso_8601": "2024-10-28T01:48:56.468503Z",
"url": "https://files.pythonhosted.org/packages/a7/6e/542beac6aa11501cfaacb5386e15529373ef55202d3c39a7d984cfa5f3b2/interpax-0.3.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-28 01:48:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "f0uriest",
"github_project": "interpax",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "equinox",
"specs": [
[
"<",
"0.12"
],
[
">=",
"0.11"
]
]
},
{
"name": "jax",
"specs": [
[
"<",
"0.5.0"
],
[
">=",
"0.3.2"
]
]
},
{
"name": "numpy",
"specs": [
[
">=",
"1.20.0"
],
[
"<",
"2.2"
]
]
}
],
"lcname": "interpax"
}