@@ -76,7 +76,7 @@ def op_simplify(self):
7676 def op_compute (self , arg_list ):
7777 try :
7878 return arg_list [0 ] + arg_list [1 ]
79- except FloatingPointError , err :
79+ except FloatingPointError as err :
8080 return execute_op_without_warnings (op = np .add ,
8181 arg1 = arg_list [0 ],
8282 arg2 = arg_list [1 ],
@@ -111,7 +111,7 @@ def op_simplify(self):
111111 def op_compute (self , arg_list ):
112112 try :
113113 return arg_list [0 ] - arg_list [1 ]
114- except FloatingPointError , err :
114+ except FloatingPointError as err :
115115 return execute_op_without_warnings (op = np .subtract ,
116116 arg1 = arg_list [0 ],
117117 arg2 = arg_list [1 ],
@@ -147,7 +147,7 @@ def op_simplify(self):
147147 def op_compute (self , arg_list ):
148148 try :
149149 return arg_list [0 ] * arg_list [1 ]
150- except FloatingPointError , err :
150+ except FloatingPointError as err :
151151 return execute_op_without_warnings (op = np .multiply ,
152152 arg1 = arg_list [0 ],
153153 arg2 = arg_list [1 ],
@@ -197,7 +197,7 @@ def op_simplify(self):
197197 def op_compute (self , arg_list ):
198198 try :
199199 return self ._process_division (arg_list [0 ], arg_list [1 ])
200- except FloatingPointError , err :
200+ except FloatingPointError as err :
201201 return execute_op_without_warnings (op = self ._process_division ,
202202 arg1 = arg_list [0 ],
203203 arg2 = arg_list [1 ],
@@ -223,7 +223,7 @@ def op_simplify(self):
223223 def op_compute (self , arg_list ):
224224 try :
225225 return np .sin (arg_list [0 ])
226- except FloatingPointError , err :
226+ except FloatingPointError as err :
227227 return execute_op_without_warnings (op = np .sin ,
228228 arg1 = arg_list [0 ],
229229 log_prefix = "[SIN_NODE] Error: " ,
@@ -248,7 +248,7 @@ def op_simplify(self):
248248 def op_compute (self , arg_list ):
249249 try :
250250 return np .cos (arg_list [0 ])
251- except FloatingPointError , err :
251+ except FloatingPointError as err :
252252 return execute_op_without_warnings (op = np .cos ,
253253 arg1 = arg_list [0 ],
254254 log_prefix = "[COS_NODE] Error: " ,
@@ -288,7 +288,7 @@ def op_simplify(self):
288288 def op_compute (self , arg_list ):
289289 try :
290290 return np .log (self ._process_arg (arg_list [0 ]))
291- except FloatingPointError , err :
291+ except FloatingPointError as err :
292292 return execute_op_without_warnings (op = lambda x : np .log (self ._process_arg (x )),
293293 arg1 = arg_list [0 ],
294294 log_prefix = "[LOG_NODE] Error: " ,
@@ -320,7 +320,7 @@ def op_simplify(self):
320320 def op_compute (self , arg_list ):
321321 try :
322322 return np .exp (arg_list [0 ])
323- except FloatingPointError , err :
323+ except FloatingPointError as err :
324324 return execute_op_without_warnings (op = np .exp ,
325325 arg1 = arg_list [0 ],
326326 log_prefix = "[EXP_NODE] Error: " ,
@@ -345,7 +345,7 @@ def op_simplify(self):
345345 def op_compute (self , arg_list ):
346346 try :
347347 return np .tanh (arg_list [0 ])
348- except FloatingPointError , err :
348+ except FloatingPointError as err :
349349 return execute_op_without_warnings (op = np .exp ,
350350 arg1 = arg_list [0 ],
351351 log_prefix = "[TANH_NODE] Error: " ,
0 commit comments