提交 b5253240 authored 作者: Sigurd Spieckermann's avatar Sigurd Spieckermann

fixed tests for local_incsubtensor_of_zeros optimization to handle numpy versions < 1.8

上级 3a6cb99f
......@@ -2519,6 +2519,9 @@ class Test_alloc_zero(unittest.TestCase):
for x in f.maker.fgraph.toposort()])
def test_advancedincsubtensor_allocs0(self):
if tensor.inplace_increment is None:
raise SkipTest('NumPy version >= 1.8 not available')
x = tensor.matrix()
y = tensor.matrix()
y0 = tensor.zeros_like(y)
......@@ -2528,6 +2531,9 @@ class Test_alloc_zero(unittest.TestCase):
for x in f.maker.fgraph.toposort()])
def test_advancedincsubtensor_allocs0t(self):
if tensor.inplace_increment is None:
raise SkipTest('NumPy version >= 1.8 not available')
x = tensor.matrix()
y = tensor.matrix()
y0 = tensor.zeros_like(y)
......@@ -2537,6 +2543,9 @@ class Test_alloc_zero(unittest.TestCase):
for x in f.maker.fgraph.toposort()])
def test_advancedincsubtensor_allocs1(self):
if tensor.inplace_increment is None:
raise SkipTest('NumPy version >= 1.8 not available')
x = tensor.matrix()
y0 = tensor.constant(numpy.asarray(numpy.zeros_like((2, 2)),
dtype=config.floatX))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论