def get_coefficients(itp, exo_grid: UnstructuredGrid, endo_grid: CartesianGrid, interp_type: Cubic, x): from interpolation.splines.prefilter_cubic import prefilter_cubic grid = endo_grid # one single CartesianGrid d = len(grid.n) # this gg could be stored as a member of itp gg = tuple( [(grid.min[i], grid.max[i], grid.n[i]) for i in range(d)] ) return [prefilter_cubic(gg, x[i]) for i in range(x.shape[0])]
def get_coefficients(itp: object, exo_grid: CartesianGrid, endo_grid: CartesianGrid, interp_type: Cubic, x: object): from interpolation.splines.prefilter_cubic import prefilter_cubic grid = exo_grid + endo_grid # one single CartesianGrid x = x.reshape(tuple(grid.n)+(-1,)) gg = grid.__numba_repr__() return prefilter_cubic(gg, x)
def get_coefficients(itp: object, exo_grid: UnstructuredGrid, endo_grid: CartesianGrid, interp_type: Cubic, x: object): from interpolation.splines.prefilter_cubic import prefilter_cubic gg = endo_grid.__numba_repr__() return [ prefilter_cubic(gg, x[i].reshape(tuple(endo_grid.n) + (-1, ))) for i in range(x.shape[0]) ]
def get_coefficients(itp, exo_grid: CartesianGrid, endo_grid: CartesianGrid, interp_type: Cubic, x): from interpolation.splines.prefilter_cubic import prefilter_cubic grid = cat_grids(exo_grid, endo_grid) # one single CartesianGrid x = x.reshape(tuple(grid.n)+(-1,)) d = len(grid.n) # this gg could be stored as a member of itp gg = tuple( [(grid.min[i], grid.max[i], grid.n[i]) for i in range(d)] ) return prefilter_cubic(gg, x)