tensor_product_barycentric_lagrange_interpolation

pyapprox.surrogates.tensor_product_barycentric_lagrange_interpolation(grid_samples_1d, fun, samples, return_all=False)[source]

Use tensor-product Barycentric Lagrange interpolation to approximate a function.

Parameters:
grid_samples_1dlist (nvars)

List containing 1D grid points defining the tensor product grid The ith entry is a np.ndarray (nsamples_ii)

funcallable

Function with the signature

fun(samples) -> np.ndarray (nx, nqoi)

where samples is np.ndarray (nvars, nx)

samplesnp.ndarray (nvars, nsamples)

The samples at which to evaluate the basis functions

Returns:
interp_valsnp.ndarray (nsamples, nqoi)

Evaluations of the interpolant at the samples

grid_samplesnp.ndarray (nvars, ngrid_samples)

if return_all: The samples used to consruct the basis functions where ngrid_samples = prod([len(s) for s in grid_samples_1d])