提交 c119eb7f authored 作者: ChienliMa's avatar ChienliMa

Modify indentation

上级 5a79e09c
...@@ -2139,12 +2139,13 @@ class Test_getitem(unittest.TestCase): ...@@ -2139,12 +2139,13 @@ class Test_getitem(unittest.TestCase):
if is_supported_version: if is_supported_version:
f1 = theano.function([x, a, b, c, d, e, f], x[a:b:e, c:d:f]) f1 = theano.function([x, a, b, c, d, e, f], x[a:b:e, c:d:f])
r1 = f1(vx, m, n, p, q, j, k) r1 = f1(vx, m, n, p, q, j, k)
t1 = vx[m:n:j, p:q:k]
else: else:
f1 = theano.function([x, a, b, c, d], x[a:b, c:d]) f1 = theano.function([x, a, b, c, d], x[a:b, c:d])
r1 = f1(vx, m, n, p, q) r1 = f1(vx, m, n, p, q)
t1 = vx[m:n, p:q] t1 = vx[m:n, p:q]
assert r1.shape == t1.shape assert r1.shape == t1.shape
assert numpy.all(t1.toarray() == r1.toarray()) assert numpy.all(t1.toarray() == r1.toarray())
""" """
Important: based on a discussion with both Fred and James Important: based on a discussion with both Fred and James
...@@ -2181,14 +2182,12 @@ class Test_getitem(unittest.TestCase): ...@@ -2181,14 +2182,12 @@ class Test_getitem(unittest.TestCase):
f4 = theano.function([x, a, b, e], x[a:b:e]) f4 = theano.function([x, a, b, e], x[a:b:e])
r4 = f4(vx, m, n, j) r4 = f4(vx, m, n, j)
t4 = vx[m:n:j] t4 = vx[m:n:j]
assert r4.shape == t4.shape
assert numpy.all(t4.toarray() == r4.toarray())
else: else:
f4 = theano.function([x, a, b], x[a:b]) f4 = theano.function([x, a, b], x[a:b])
r4 = f4(vx, m, n) r4 = f4(vx, m, n)
t4 = vx[m:n] t4 = vx[m:n]
assert r4.shape == t4.shape assert r4.shape == t4.shape
assert numpy.all(t4.toarray() == r4.toarray()) assert numpy.all(t4.toarray() == r4.toarray())
#----------------------------------------------------------- #-----------------------------------------------------------
# test cases using int indexing instead of theano variable # test cases using int indexing instead of theano variable
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论