Skip to content

Commit

Permalink
Merge pull request #590 from MilesCranmer/missing-sympy
Browse files Browse the repository at this point in the history
Add missing `greater` operator in sympy mapping
  • Loading branch information
MilesCranmer committed Mar 31, 2024
2 parents 09bfff6 + 5dbc3b7 commit 46227e8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pysr/export_sympy.py
Expand Up @@ -50,6 +50,7 @@
"round": lambda x: sympy.ceiling(x - 0.5),
"max": lambda x, y: sympy.Piecewise((y, x < y), (x, True)),
"min": lambda x, y: sympy.Piecewise((x, x < y), (y, True)),
"greater": lambda x, y: sympy.Piecewise((1.0, x > y), (0.0, True)),
"cond": lambda x, y: sympy.Piecewise((y, x > 0), (0.0, True)),
"logical_or": lambda x, y: sympy.Piecewise((1.0, (x > 0) | (y > 0)), (0.0, True)),
"logical_and": lambda x, y: sympy.Piecewise((1.0, (x > 0) & (y > 0)), (0.0, True)),
Expand Down

0 comments on commit 46227e8

Please sign in to comment.