@@ -1268,7 +1268,7 @@ def test_numpy_op_bin_reduce(self):
12681268 "xor" , lambda x , y : (x .sum () == y .sum ()) ^ (((- x ).sum ()) == y .sum ())
12691269 )
12701270
1271- def common_test_inline (self , fonx , fnp , tcst = 0 ):
1271+ def common_test_inline (self , fonx , fnp , tcst = 0 , atol = 1e-10 ):
12721272 f = fonx (Input ("A" ))
12731273 self .assertIsInstance (f , Var )
12741274 onx = f .to_onnx (constraints = {0 : Float64 [None ], (0 , False ): Float64 [None ]})
@@ -1277,7 +1277,7 @@ def common_test_inline(self, fonx, fnp, tcst=0):
12771277 y = fnp (x )
12781278 ref = ReferenceEvaluator (onx )
12791279 got = ref .run (None , {"A" : x })
1280- self .assertEqualArray (y , got [0 ], atol = 1e-10 )
1280+ self .assertEqualArray (y , got [0 ], atol = atol )
12811281
12821282 def common_test_inline_bin (self , fonx , fnp , tcst = 0 ):
12831283 f = fonx (Input ("A" ), Input ("B" ))
@@ -1470,7 +1470,7 @@ def test_equal(self):
14701470
14711471 @unittest .skipIf (scipy is None , reason = "scipy is not installed." )
14721472 def test_erf (self ):
1473- self .common_test_inline (erf_inline , scipy .special .erf )
1473+ self .common_test_inline (erf_inline , scipy .special .erf , atol = 1e-7 )
14741474
14751475 def test_exp (self ):
14761476 self .common_test_inline (exp_inline , np .exp )
0 commit comments