semantique.processor.arrays.Array.evaluate

Contents

semantique.processor.arrays.Array.evaluate#

Array.evaluate(operator, y=None, track_types=True, **kwargs)[source]#

Apply the evaluate verb to the array.

The evaluate verb evaluates an expression for each pixel in an array.

Parameters:
  • operator (callable) – Operator function to be used in the expression.

  • y (optional) – Right-hand side of the expression. May be a constant, meaning that the same value is used in each expression. May also be another array which can be aligned to the same shape as the input array. In the latter case, when evaluating the expression for a pixel in the input array the second operand is the value of the pixel in array y that has the same dimension coordinates. Ignored when the operator is univariate.

  • track_types (bool) – Should the operator promote the value type of the output object, based on the value type(s) of the operand(s)?

  • **kwargs – Additional keyword arguments passed on to the operator function.

Returns:

xarray.DataArray