iarray.expr_from_string#
- iarray.expr_from_string(sexpr: str, inputs: dict, cfg: Optional[Config] = None, debug: int = 0, **kwargs) Expr #
Create an
Expr
instance from an expression in string form.- Parameters
sexpr¶ (str) – An expression in string form.
inputs¶ (dict) – Map of variables in sexpr to actual arrays.
cfg¶ (
Config
) – The configuration for running the expression. If None (default), global defaults are used.kwargs¶ (dict) – A dictionary for setting some or all of the fields in the
Config
dataclass that should override the current configuration.
- Returns
An expression ready to be evaluated via
Expr.eval()
.- Return type
See also