tensor_product_piecewise_polynomial_interpolation

pyapprox.surrogates.tensor_product_piecewise_polynomial_interpolation(samples, levels, fun, basis_type='linear', var_trans=None, return_all=False)[source]

Use tensor-product piecewise polynomial basis to interpolate a function.

Parameters:
samplesnp.ndarray (nvars, nsamples)

The samples at which to evaluate the basis functions

levelsarray_like (nvars)

The levels of each 1D dydadic grid.

funcallable

Function with the signature

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

where samples is np.ndarray (nvars, nx)

basis_typestring

The type of piecewise polynomial basis, i.e. ‘linear’ or ‘quadratic’

Returns:
basis_valsnp.ndarray(nsamples, nqoi)

Evaluations of the interpolant at the samples