@@ -1248,8 +1248,6 @@ def simplify(
1248
1248
>>> equation_tree.sympy_expr
1249
1249
(-c_1 + x_1)*(c_1 - x_1)
1250
1250
1251
- # it is good practice to define tests at the begining of a script and use them
1252
- # throughout the project
1253
1251
>>> equation_tree.simplify(
1254
1252
... operator_test=is_operator,
1255
1253
... function_test=is_function
@@ -1283,18 +1281,18 @@ def operator_test(x):
1283
1281
def operator_test (x ):
1284
1282
return tmp_o (x ) or x in self .operators
1285
1283
1286
- class TimeoutError (Exception ):
1287
- pass
1284
+ # class TimeoutError(Exception):
1285
+ # pass
1288
1286
1289
- def timeout_handler (signum , frame ):
1290
- raise TimeoutError ("Function call timed out" )
1287
+ # def timeout_handler(signum, frame):
1288
+ # raise TimeoutError("Function call timed out")
1291
1289
1292
- signal .signal (signal .SIGALRM , timeout_handler )
1293
- signal .alarm (SIMPLIFY_TIMEOUT )
1290
+ # signal.signal(signal.SIGALRM, timeout_handler)
1291
+ # signal.alarm(SIMPLIFY_TIMEOUT)
1294
1292
try :
1295
1293
simplified_equation = simplify (self .sympy_expr )
1296
- signal .alarm (0 )
1297
- except TimeoutError :
1294
+ # signal.alarm(0)
1295
+ except :
1298
1296
simplified_equation = self .sympy_expr
1299
1297
if not check_functions (simplified_equation , function_test ):
1300
1298
warnings .warn (
0 commit comments