Skip to main content

Tensor product spline interpolation package

Project description

Introduction

The TPI package implements tensor spline interpolation in arbitrary dimensions.

The package provides two classes

BsplineBasis1D:

  • Calculates the B-spline basis for a 1-dimensional knots vector.
  • Constructs the spline matrix.
  • The splines are cubic and use not-a-knot boundary conditions.

TP_Interpolant_ND:

  • Provides setup and solution of tensor product spline problems in N dimensions.
  • Sets up spline data structures for a Cartesian product grid.
  • Computes the spline coefficients given data for a scalar gridfunction.
  • Carries interpolates the griddata at a desired point in the parameter space spanned by the grid.
  • Spline coefficient data can be returned or set, so that the setup and solution of the interpolation problem can be separated, by writing the coefficient data to disk.

Installation

To install to the system python folder run

  python setup.py build_ext
  sudo python setup.py install

If you do not have admin rights you can install locally

  python setup.py build_ext
  python setup.py build_ext install --user

You can create a source distribution and then install the package with pip

python setup.py sdist
pip install --user

or you can build the package using

python3 -m build

You can also install the package via https://pypi.org/project/tpi-splines/.

TPI supports Python 3. Unit tests can be run with pytest.

Dependencies

TPI requires GSL, the GNU Scientific Library. The project homepage is http://www.gnu.org/software/gsl/

TPI now supports gsl 2.x (It has been tested with gsl 2.7.1).

gsl-config --version

On OS X you can use "brew" (https://brew.sh/) to install gsl. Note that the "brew switch" command which could be used to select a particular version of a software package, no longer exists.

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

tpi-splines-1.0.1.tar.gz (128.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tpi_splines-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl (56.3 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

Details for the file tpi-splines-1.0.1.tar.gz.

File metadata

  • Download URL: tpi-splines-1.0.1.tar.gz
  • Upload date:
  • Size: 128.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for tpi-splines-1.0.1.tar.gz
Algorithm Hash digest
SHA256 a6d1e3f0d7977a39a27c634ee5c688df25afcdc06228ecfab965ae8caf0342f9
MD5 24b2a8478b88a486a53fd0ed9db46b19
BLAKE2b-256 c1ece9f0ff8557d576c138efa1b9aaac8602ea753c9c894bbc8d70d927ed70d4

See more details on using hashes here.

File details

Details for the file tpi_splines-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for tpi_splines-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 520decc0d87fb3b05803fbdeab240060a58691a838f2416dade805b48a281117
MD5 a3ceae4dccbdad95a7142fc1d3885b63
BLAKE2b-256 3d8a3584bfdcb5478b4ad3eafa7c889cf2b97c1f24f9421b2b1cc3e39298a71c

See more details on using hashes here.

Supported by

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