experimental_experiment.xbuilder.expression_dimension

class experimental_experiment.xbuilder.expression_dimension.Expression(expr: str, parsed: Expression | None = None)[source]

A formula using dimension.

experimental_experiment.xbuilder.expression_dimension.parse_expression(expr: str, context: Dict[str, Any] | None = None, exc: bool = True) Expression[source]

Parses an expression involving dimensions.

Parameters:
  • expr – an expression

  • exc – raises an exception if it fails

  • context – known variables (or dimensions)

Returns:

an expression

experimental_experiment.xbuilder.expression_dimension.parse_expression_tokens(expr: str)[source]

Extracts the token from an expression.