dualbounds.interpolation.linear_interpolate

dualbounds.interpolation.linear_interpolate(x: array, y: array, newx: array)[source]

Linear interpolation.

Parameters:
x : np.array

n-length array of inputs. Must be sorted, although this is not explicitly enforced to save time.

y : np.array

n-length array of outputs

newx : np.array

m-length array of new inputs

Returns:

newy – m-length array of interpolated outputs

Return type:

np.array