提交 75c11ac0 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Use (corrected) tensor._allclose instead of (bugged) numpy.allclose in test.

Fixes #586, the error was not due to the values being compared, but to the comparison function itself.
上级 f85b01e1
......@@ -23,6 +23,7 @@ from theano.sparse import csc_from_dense, csr_from_dense, dense_from_sparse
from theano.tests import unittest_tools as utt
from theano import tensor
from theano.tensor.basic import _allclose
def eval_outputs(outputs):
......@@ -298,7 +299,7 @@ class test_structureddot(unittest.TestCase):
scipy_result = spmat * mat
assert theano_result.shape == scipy_result.shape
assert theano_result.dtype == scipy_result.dtype
assert numpy.allclose(theano_result, scipy_result)
assert _allclose(theano_result, scipy_result)
def test_opt_unpack(self):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论