The griddata
function in scipy.interpolate
offers a way to interpolate data on a grid. However, its performance can be suboptimal when dealing with large datasets due to recalculating grid relationships each time. To address this issue, a separate implementation of the griddata
function has been developed, inspired by scipy.interpolate.interp1d
functions.
This alternative implementation divides the griddata
process into two parts:
Establishing Grid Relationships: The first step involves establishing the relationships between the old and new grids.
Applying Established Relationships: The second step utilizes these established relationships to interpolate different input data efficiently.
To install speedup_griddata, simply clone this repository and run the setup file using the following command:
$ python setup.py install
speedup_griddata requires the following dependencies to be installed:
"numpy", "scipy"
speedup_griddata do the exact same thing as scipy.interpolate.griddata, but faster when interpolating multiple data with the same grid.
Contributions to speedup_griddata are welcome! Please feel free to fork this repository and submit pull requests with your improvements.
This software is written by Tianshi DU in 2023 in Qingdao, Shandong, China.