MilesCranmer commited on
Commit
47055c8
2 Parent(s): bfe511a 0d60bb3

Merge pull request #50 from MilesCranmer/deepsource-fix-b48a9bb1

Browse files
Files changed (1) hide show
  1. pysr/sr.py +19 -19
pysr/sr.py CHANGED
@@ -38,33 +38,33 @@ sympy_mappings = {
38
  "sub": lambda x, y: x - y,
39
  "neg": lambda x: -x,
40
  "pow": lambda x, y: abs(x) ** y,
41
- "cos": lambda x: sympy.cos(x),
42
- "sin": lambda x: sympy.sin(x),
43
- "tan": lambda x: sympy.tan(x),
44
- "cosh": lambda x: sympy.cosh(x),
45
- "sinh": lambda x: sympy.sinh(x),
46
- "tanh": lambda x: sympy.tanh(x),
47
- "exp": lambda x: sympy.exp(x),
48
- "acos": lambda x: sympy.acos(x),
49
- "asin": lambda x: sympy.asin(x),
50
- "atan": lambda x: sympy.atan(x),
51
  "acosh": lambda x: sympy.acosh(abs(x) + 1),
52
  "acosh_abs": lambda x: sympy.acosh(abs(x) + 1),
53
- "asinh": lambda x: sympy.asinh(x),
54
  "atanh": lambda x: sympy.atanh(sympy.Mod(x + 1, 2) - 1),
55
  "atanh_clip": lambda x: sympy.atanh(sympy.Mod(x + 1, 2) - 1),
56
- "abs": lambda x: abs(x),
57
- "mod": lambda x, y: sympy.Mod(x, y),
58
- "erf": lambda x: sympy.erf(x),
59
- "erfc": lambda x: sympy.erfc(x),
60
  "log_abs": lambda x: sympy.log(abs(x)),
61
  "log10_abs": lambda x: sympy.log(abs(x), 10),
62
  "log2_abs": lambda x: sympy.log(abs(x), 2),
63
  "log1p_abs": lambda x: sympy.log(abs(x) + 1),
64
- "floor": lambda x: sympy.floor(x),
65
- "ceil": lambda x: sympy.ceil(x),
66
- "sign": lambda x: sympy.sign(x),
67
- "gamma": lambda x: sympy.gamma(x),
68
  }
69
 
70
 
 
38
  "sub": lambda x, y: x - y,
39
  "neg": lambda x: -x,
40
  "pow": lambda x, y: abs(x) ** y,
41
+ "cos": sympy.cos,
42
+ "sin": sympy.sin,
43
+ "tan": sympy.tan,
44
+ "cosh": sympy.cosh,
45
+ "sinh": sympy.sinh,
46
+ "tanh": sympy.tanh,
47
+ "exp": sympy.exp,
48
+ "acos": sympy.acos,
49
+ "asin": sympy.asin,
50
+ "atan": sympy.atan,
51
  "acosh": lambda x: sympy.acosh(abs(x) + 1),
52
  "acosh_abs": lambda x: sympy.acosh(abs(x) + 1),
53
+ "asinh": sympy.asinh,
54
  "atanh": lambda x: sympy.atanh(sympy.Mod(x + 1, 2) - 1),
55
  "atanh_clip": lambda x: sympy.atanh(sympy.Mod(x + 1, 2) - 1),
56
+ "abs": abs,
57
+ "mod": sympy.Mod,
58
+ "erf": sympy.erf,
59
+ "erfc": sympy.erfc,
60
  "log_abs": lambda x: sympy.log(abs(x)),
61
  "log10_abs": lambda x: sympy.log(abs(x), 10),
62
  "log2_abs": lambda x: sympy.log(abs(x), 2),
63
  "log1p_abs": lambda x: sympy.log(abs(x) + 1),
64
+ "floor": sympy.floor,
65
+ "ceil": sympy.ceiling,
66
+ "sign": sympy.sign,
67
+ "gamma": sympy.gamma,
68
  }
69
 
70