semantique.ArrayProxy.fill

semantique.ArrayProxy.fill#

ArrayProxy.fill(dimension, method, **kwargs)[source]#

Fill nodata values in array by interpolating valid data values.

Fills nodata values by fitting an interpolation function to the valid data values along a given dimension. When the specified dimension is the stacked space dimension, 2D interpolation methods can be applied. For regular dimensions, 1D interpolation methods are applied.

Parameters:
  • dimension (str) – Name of the dimension along which to interpolate.

  • method (str) – Interpolation method to use. One of nearest, linear or cubic.

  • track_types (bool) – Should the value type(s) of the input(s) be checked, and the value type of the output be promoted, whenever applicable?

  • **kwargs – Additional keyword arguments passed on to Array.fill.

Returns:

ArrayProxy

Examples

>>> import semantique as sq
>>> sq.entity("water").fill("time", "nearest")