提交 15f3c28e authored 作者: John Salvatier's avatar John Salvatier

fix tests for advanced inc

上级 701f8b54
......@@ -3131,10 +3131,6 @@ class T_subtensor(unittest.TestCase, utt.TestOptimizationMixin):
n = self.shared(numpy.asarray(5, dtype=self.dtype))
self.assertRaises(TypeError, n.__getitem__, [0, 0])
def test_err_invalid_not_2d(self):
n = self.shared(numpy.ones((3, 3, 3), dtype=self.dtype) * 5)
self.assertRaises(NotImplementedError, n.__getitem__,
([0, 0, 0], [1, 1, 1], [2, 2, 2]))
def test_err_invalid_2list_dtype(self):
n = self.shared(numpy.ones((3, 3), dtype=self.dtype) * 5)
......@@ -3752,8 +3748,7 @@ class TestAdvancedSubtensor(unittest.TestCase):
def test_inc_adv_selection(self):
a = inc_subtensor(self.v[self.ix2], self.v[self.ix2])
typ = TensorType(self.v.type.dtype, self.ix2.type.broadcastable)
assert a.type == typ, (a.type,typ)
assert a.type == self.v.type, (a.type,self.v.type)
f = theano.function([self.v, self.ix2], a, allow_input_downcast=True)
aval = f([.4, .9, .1], [[1, 2],
[1, 2]])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论