semantique.processor.operators.multiply_

Contents

semantique.processor.operators.multiply_#

semantique.processor.operators.multiply_(x, y, track_types=True, **kwargs)[source]#

Multiply x by y.

Parameters:
  • x (xarray.DataArray) – Array containing the operands at the left-hand side of each expression.

  • y – Operands at the right-hand side of each 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 array x. In the latter case, when evaluating the expression for a pixel in array x the second operand is the value of the pixel in array y that has the same dimension coordinates.

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

  • **kwargs – Ignored.

Returns:

xarray.DataArray – An array with the same shape as x containing the results of all evaluated expressions.

Note

When tracking value types, this operator uses the following type promotion manual, with the first layer of keys being the supported value types of x, the second layer of keys being the supported value types of y given the value type of x, and the corresponding value being the promoted value type of the output.

{'continuous': {'continuous': 'continuous', 'discrete': 'continuous'}, 'discrete': {'continuous': 'continuous', 'discrete': 'discrete'}}