Skip to content

rae-gh/grid-fit

Repository files navigation

grid-fit

Fast N-dimensional polynomial interpolation on regular grids with Python and R bindings.

Features

  • Trilinear interpolation (faster than scipy)
  • Extends naturally to tricubic, higher dimensions
  • Python and R bindings
  • Efficient precomputed matrix approach

Installation

Python

Install directly from GitHub:

python -m pip install git+https://github.com/rae-gh/grid-fit.git

R

Install directly from GitHub using devtools:

install.packages("devtools")
library(devtools)
install_url("https://github.com/rae-gh/grid-fit/archive/refs/heads/main.zip")

Usage Example

Python

import gridfit
result = gridfit.interp(0, 1, 1)
print(result)  # [0.5]

R

library(gridfit)
result <- interp(0, 1, 1)
print(result)  # [0.5]

Developer Onboarding

To build, install, and test all language bindings (C++, Python, R) in one step, run:

./install.sh

This script will build everything and run example scripts for all three languages. If you see output from all three, your setup is correct!

For more details, see DEV.md or docs/development.md.


**.gitignore:**

Build artifacts

build/ dist/ *.so *.dll *.dylib *.o

Python

pycache/ *.pyc *.egg-info/ .pytest_cache/

R

*.Rcheck/ .Rhistory

IDE

.vscode/ .idea/ *.swp

About

A grid based interpolation library in C++ with R and python bindings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors