Linear

Module for Linear N-Dimensional Interpolation

class Linear(fill_value=nan)[source]

Bases: Approximation

Multidimensional linear interpolator.

Parameters:

fill_value (float) – value used to fill in for requested points outside of the convex hull of the input points. If not provided, then the default is numpy.nan.

Initialize a Linear interpolator.

Parameters:

fill_value (float) – Value for points outside the convex hull. Default is numpy.nan.

_abc_impl = <_abc._abc_data object>
fit(points, values)[source]

Construct the interpolator given points and values.

Parameters:
  • points (array_like) – the coordinates of the points.

  • values (array_like) – the values in the points.

predict(new_point)[source]

Evaluate interpolator at given new_points.

Parameters:

new_points (array_like) – the coordinates of the given points.

Returns:

the interpolated values.

Return type:

numpy.ndarray