MilesCranmer commited on
Commit
34d37c0
1 Parent(s): 1e3fd5e

Configure new backend version

Browse files
Files changed (2) hide show
  1. pysr/sr.py +7 -2
  2. pysr/version.py +2 -2
pysr/sr.py CHANGED
@@ -41,13 +41,14 @@ already_ran = False
41
  sympy_mappings = {
42
  "div": lambda x, y: x / y,
43
  "mult": lambda x, y: x * y,
 
44
  "sqrt_abs": lambda x: sympy.sqrt(abs(x)),
45
  "square": lambda x: x**2,
46
  "cube": lambda x: x**3,
47
  "plus": lambda x, y: x + y,
48
  "sub": lambda x, y: x - y,
49
  "neg": lambda x: -x,
50
- "pow": lambda x, y: sympy.Function("unimplemented_pow")(x, y),
51
  "pow_abs": lambda x, y: abs(x) ** y,
52
  "cos": sympy.cos,
53
  "sin": sympy.sin,
@@ -59,7 +60,7 @@ sympy_mappings = {
59
  "acos": sympy.acos,
60
  "asin": sympy.asin,
61
  "atan": sympy.atan,
62
- "acosh": lambda x: sympy.acosh(abs(x) + 1),
63
  "acosh_abs": lambda x: sympy.acosh(abs(x) + 1),
64
  "asinh": sympy.asinh,
65
  "atanh": lambda x: sympy.atanh(sympy.Mod(x + 1, 2) - 1),
@@ -68,6 +69,10 @@ sympy_mappings = {
68
  "mod": sympy.Mod,
69
  "erf": sympy.erf,
70
  "erfc": sympy.erfc,
 
 
 
 
71
  "log_abs": lambda x: sympy.log(abs(x)),
72
  "log10_abs": lambda x: sympy.log(abs(x), 10),
73
  "log2_abs": lambda x: sympy.log(abs(x), 2),
 
41
  sympy_mappings = {
42
  "div": lambda x, y: x / y,
43
  "mult": lambda x, y: x * y,
44
+ "sqrt": lambda x: sympy.sqrt(x),
45
  "sqrt_abs": lambda x: sympy.sqrt(abs(x)),
46
  "square": lambda x: x**2,
47
  "cube": lambda x: x**3,
48
  "plus": lambda x, y: x + y,
49
  "sub": lambda x, y: x - y,
50
  "neg": lambda x: -x,
51
+ "pow": lambda x, y: x ** y,
52
  "pow_abs": lambda x, y: abs(x) ** y,
53
  "cos": sympy.cos,
54
  "sin": sympy.sin,
 
60
  "acos": sympy.acos,
61
  "asin": sympy.asin,
62
  "atan": sympy.atan,
63
+ "acosh": lambda x: sympy.acosh(x),
64
  "acosh_abs": lambda x: sympy.acosh(abs(x) + 1),
65
  "asinh": sympy.asinh,
66
  "atanh": lambda x: sympy.atanh(sympy.Mod(x + 1, 2) - 1),
 
69
  "mod": sympy.Mod,
70
  "erf": sympy.erf,
71
  "erfc": sympy.erfc,
72
+ "log": lambda x: sympy.log(x),
73
+ "log10": lambda x: sympy.log(x, 10),
74
+ "log2": lambda x: sympy.log(x, 2),
75
+ "log1p": lambda x: sympy.log(x + 1),
76
  "log_abs": lambda x: sympy.log(abs(x)),
77
  "log10_abs": lambda x: sympy.log(abs(x), 10),
78
  "log2_abs": lambda x: sympy.log(abs(x), 2),
pysr/version.py CHANGED
@@ -1,2 +1,2 @@
1
- __version__ = "0.10.4-1"
2
- __symbolic_regression_jl_version__ = "0.10.1"
 
1
+ __version__ = "0.11.0"
2
+ __symbolic_regression_jl_version__ = "0.12.0"