提交 130c01f8 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Fixes for Python 2.4

上级 766e8124
......@@ -12,7 +12,7 @@ except ImportError:
import theano
from theano import compile, config
from theano.sparse import enable_sparse
from theano.gof.python25 import all, product
from theano.gof.python25 import all, any, product
if enable_sparse == False:
raise SkipTest('Optional package sparse disabled')
......
......@@ -3,7 +3,7 @@
import itertools, sys
import theano.tensor as T
from theano import tensor
#from theano.gof import Env
from theano.gof.python25 import product as itertools_product
from theano.printing import pp
import numpy
......@@ -1535,7 +1535,7 @@ class TestBlasStrides(TestCase):
mode=self.mode)
# Try with all stride patterns, and all transposed pattern
for step_signs in itertools.product((-1, 1), repeat=4):
for step_signs in itertools_product((-1, 1), repeat=4):
for step in (1, 2):
b_step1, b_step2, c_step1, c_step2 = (s * step
for s in step_signs)
......@@ -1605,7 +1605,7 @@ class TestBlasStrides(TestCase):
mode=self.mode)
# Try with all stride patterns, and all transposed pattern
for step_signs in itertools.product((-1, 1), repeat=4):
for step_signs in itertools_product((-1, 1), repeat=4):
for step in (1, 2):
b_step1, b_step2, c_step1, c_step2 = (s * step
for s in step_signs)
......@@ -1692,7 +1692,7 @@ class TestBlasStrides(TestCase):
mode=self.mode)
# Try with all stride patterns, and all transposed pattern
for step_signs in itertools.product((-1, 1), repeat=6):
for step_signs in itertools_product((-1, 1), repeat=6):
for step in (1, 2):
a_step1, a_step2, b_step1, b_step2, c_step1, c_step2 = \
(s * step for s in step_signs)
......@@ -1785,7 +1785,7 @@ class TestBlasStrides(TestCase):
mode=self.mode)
# Try with all stride patterns, and all transposed pattern
for step_signs in itertools.product((1, -1), repeat=4):
for step_signs in itertools_product((1, -1), repeat=4):
for step in (1, 2):
a_step, b_step1, b_step2, c_step = (s * step
for s in step_signs)
......@@ -1841,7 +1841,7 @@ class TestBlasStrides(TestCase):
mode=self.mode)
# Try with all stride patterns, and all transposed patterns
for step_signs in itertools.product((1, -1), repeat=4):
for step_signs in itertools_product((1, -1), repeat=4):
for step in (1, 2):
a_step1, a_step2, b_step, c_step = (s * step
for s in step_signs)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论