Skip to content
Snippets Groups Projects
Commit 0809e2ea authored by Markus Holzer's avatar Markus Holzer Committed by Philipp Suffa
Browse files

Generalise Cumulant simplificaiton

parent 9645d493
No related branches found
No related tags found
1 merge request!150Generalise Cumulant simplificaiton
......@@ -16,11 +16,8 @@ def insert_logs(ac, **kwargs):
def insert_log_products(ac, **kwargs):
def callback(asm):
rhs = asm.rhs
if isinstance(rhs, sp.log):
if rhs.find(sp.log):
return True
if isinstance(rhs, sp.Mul):
if any(isinstance(arg, sp.log) for arg in rhs.args):
return True
return False
return insert_subexpressions(ac, callback, **kwargs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment