imate.InterpolateTrace.eval#
- InterpolateTrace.eval(t)#
Evaluate the exact value of the function at the input point t without interpolation.
Warning
If t is an array of large size, this may take a very long run time as all input points are evaluated without.
- Parameters:
- tfloat or array_like[float]
An inquiry point (or list of points) to interpolate.
- Returns:
- normfloat or numpy.array
Exact values of the function. If the input t is a list or array, the output is an array of the same size of t.
Examples
>>> # Generate two sample matrices (symmetric positive-definite) >>> from imate.sample_matrices import correlation_matrix >>> A = correlation_matrix(size=20, scale=1e-1) >>> # Initialize interpolator object >>> from imate import InterpolateTrace >>> ti = [1e-2, 1e-1, 1, 1e1] >>> f = InterpolateTrace(A, ti=ti) >>> # Exact function value at an inquiry point t = 0.4 >>> t = 4e-1 >>> f.eval(t) 19.932296005392935 >>> # Array of input points >>> t = [4e-1, 4, 4e+1] >>> f.eval(t) array([19.93229601, 4.12887133, 0.48808245])