Interpolation and function approximation with JAX
Project description
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:
pip install interpax
Usage
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file interpax-0.3.12.tar.gz.
File metadata
- Download URL: interpax-0.3.12.tar.gz
- Upload date:
- Size: 58.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9563b5458a70a9bac34372c68d8fca34a03864e19805b06763a1c48dbd420699
|
|
| MD5 |
83eb16a5164dbc3b4d4ef3d7e99b20a5
|
|
| BLAKE2b-256 |
1b3955576cf2c33c1f4df483ec1507fb36027389c00863772b78abf04c75afff
|
Provenance
The following attestation bundles were made for interpax-0.3.12.tar.gz:
Publisher:
release.yml on f0uriest/interpax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
interpax-0.3.12.tar.gz -
Subject digest:
9563b5458a70a9bac34372c68d8fca34a03864e19805b06763a1c48dbd420699 - Sigstore transparency entry: 663684411
- Sigstore integration time:
-
Permalink:
f0uriest/interpax@360fca48d094905c4710f35a2c40c7ccc05db524 -
Branch / Tag:
refs/tags/v0.3.12 - Owner: https://github.com/f0uriest
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@360fca48d094905c4710f35a2c40c7ccc05db524 -
Trigger Event:
release
-
Statement type:
File details
Details for the file interpax-0.3.12-py3-none-any.whl.
File metadata
- Download URL: interpax-0.3.12-py3-none-any.whl
- Upload date:
- Size: 27.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f447c238ae629dabf23f9c04671d52a03d11251f31ec7607556c576a81142b6
|
|
| MD5 |
a87f7def531d3eab16733e149b8f62ee
|
|
| BLAKE2b-256 |
e6412077ef0c346d44ec66d1ee807493631fbe07e6088255191b4324fc258949
|
Provenance
The following attestation bundles were made for interpax-0.3.12-py3-none-any.whl:
Publisher:
release.yml on f0uriest/interpax
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
interpax-0.3.12-py3-none-any.whl -
Subject digest:
1f447c238ae629dabf23f9c04671d52a03d11251f31ec7607556c576a81142b6 - Sigstore transparency entry: 663684416
- Sigstore integration time:
-
Permalink:
f0uriest/interpax@360fca48d094905c4710f35a2c40c7ccc05db524 -
Branch / Tag:
refs/tags/v0.3.12 - Owner: https://github.com/f0uriest
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@360fca48d094905c4710f35a2c40c7ccc05db524 -
Trigger Event:
release
-
Statement type: