modeci_mdf.execution_engine.evaluate_expr
- modeci_mdf.execution_engine.evaluate_expr(expr: str | List[str] | ndarray = None, func_params: Dict[str, Any] = None, array_format: str = 'numpy', allow_strings_returned: bool | None = False, verbose: bool | None = False) ndarray[source]
Evaluates an expression given in string format and a
dictof parameters.- Parameters:
expr – Expression or list of expressions to be evaluated
func_params – A dict of parameters (e.g.
{'weight': 2})array_format – It can be a n-dimensional array or a tensor
allow_strings_returned – Don’t throw an error if the expression evaluates to a string
verbose – If set to True provides in-depth information else verbose message is not displayed
- Returns:
n-dimensional array