pg_utils.sympy_supp.simplify.recursive_collect_tree

pg_utils.sympy_supp.simplify.recursive_collect_tree(expr: Expr, syms: List[Union[Symbol, List[Symbol]]]) dict[source]

Recursively collect an expression by symbols to a tree

Parameters:
  • expr (sympy.Expr) – expression to be processed

  • syms (List[Union[sympy.Symbol, List[sympy.Symbol]]]) – sympy symbols whose coefficients are to be collected. See recursive_collect for details.

Returns:

collected output as a tree repr. by a dict