Spaces:
Running
Running
deepsource-autofix[bot]
commited on
Commit
•
84fdbc6
1
Parent(s):
b5d0afb
Remove unnecessary lambda expression
Browse files- 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":
|
42 |
-
"sin":
|
43 |
-
"tan":
|
44 |
-
"cosh":
|
45 |
-
"sinh":
|
46 |
-
"tanh":
|
47 |
-
"exp":
|
48 |
-
"acos":
|
49 |
-
"asin":
|
50 |
-
"atan":
|
51 |
"acosh": lambda x: sympy.acosh(abs(x) + 1),
|
52 |
"acosh_abs": lambda x: sympy.acosh(abs(x) + 1),
|
53 |
-
"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":
|
57 |
-
"mod":
|
58 |
-
"erf":
|
59 |
-
"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":
|
65 |
-
"ceil":
|
66 |
-
"sign":
|
67 |
-
"gamma":
|
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.ceil,
|
66 |
+
"sign": sympy.sign,
|
67 |
+
"gamma": sympy.gamma,
|
68 |
}
|
69 |
|
70 |
|