heyoka.subs

Contents

heyoka.subs#

heyoka.subs(arg: expression | list[expression], smap: dict[str | expression, expression]) expression | list[expression]#

Substitution.

This function will traverse the input expression(s) arg and substitute occurrences of the keys in smap with the corresponding values. String keys in smap are interpreted as variable names.

Parameters:
  • arg – the input expression(s).

  • smap – the substitution dictionary.

Returns:

the result of the substitution.