ewoksxas.tasks.combine_rows.evaluate_equation#
- ewoksxas.tasks.combine_rows.evaluate_equation(equation, rows)[source]#
Evaluate the equation with rows available as local names.
- Args:
equation: A Python equation string such as
"a / b"or"log(a)". rows: Mapping from metadata value string to the corresponding array.- Returns:
The computed result array with the same length as the input rows.
- Raises:
- ValueError: If the equation fails to evaluate or the result does not
have the same length as the input rows.
- Parameters:
equation (
str)rows (
dict[str,ndarray])
- Return type:
ndarray