1
0
Fork 0
This repository has been archived on 2024-06-28. You can view files and clone it, but cannot push or open issues or pull requests.
collision-analysis-and-inte.../interpolators/griddata.py
2019-05-02 14:12:06 +02:00

12 lines
423 B
Python

from numpy import ndarray, save
from scipy.interpolate import griddata
from interpolators.base import BaseInterpolator
class GriddataInterpolator(BaseInterpolator):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def interpolate(self, alpha, v, mcode, gamma, wt, wp) -> ndarray:
return griddata(self.points, self.values, (alpha, v, mcode, gamma, wt, wp), method="linear")