Skip to content

Commit ec3384d

Browse files
committed
fix
1 parent 9ccab70 commit ec3384d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOGS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Change Logs
44
0.3.2
55
+++++
66

7+
* :pr:`103`: fix import issue with the latest onnx version
78
* :pr:`101`: fix as_tensor in onnx_text_plot_tree
89

910
0.3.1

_unittests/ut_npx/test_npx.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)