We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87dd8a1 commit 0796394Copy full SHA for 0796394
dolang/language.py
@@ -84,11 +84,9 @@ def eval_data(data: "yaml_structure", calibration={}):
84
85
import warnings
86
from yaml import MappingNode, SequenceNode, ScalarNode
87
-
88
- import math
+
89
d = calibration.copy()
90
- d['log'] = math.log
91
- d['exp'] = math.exp
+ d.update(functions)
92
93
if isinstance(data, ScalarNode):
94
@@ -99,8 +97,6 @@ def eval_data(data: "yaml_structure", calibration={}):
99
97
elif isinstance(val, str):
100
98
# could be a string, could be an expression, could depend on other sections
101
try:
102
- print(val)
103
- print(d)
104
val = eval(val.replace("^", "**"), d)
105
except Exception as e:
106
warnings.warn(f"Impossible to evaluate expression: {val}")
0 commit comments