foxes.output.FarmResultsEval.weinsum(rhs, *vars)[source]

Calculates Einstein sum, adding weights as last argument to the given fields.

It’s all about treating NaN values.

Parameters

rhs: str

The right-hand side of the einsum expression. Convention: ‘s’ for states, ‘t’ for turbines

vars: tuple of str or np.ndarray

The variables mentioned in the expression, but without the obligatory weights that will be added at the end

Returns

result: np.ndarray

The results array