提交 c12bafe6 authored 作者: Tim Cooijmans's avatar Tim Cooijmans

map_variables: satisfy flake8

上级 910cce90
...@@ -84,7 +84,7 @@ class TestMapVariables(object): ...@@ -84,7 +84,7 @@ class TestMapVariables(object):
f = theano.function([x, outer], [t, t2]) f = theano.function([x, outer], [t, t2])
rval = f(x=numpy.array([1, 2, 3]), outer=0.5) rval = f(x=numpy.array([1, 2, 3]), outer=0.5)
assert numpy.array_equal(rval, [[ 1, 3, 6], [-1, -3, -6]]) assert numpy.array_equal(rval, [[1, 3, 6], [-1, -3, -6]])
def test_leaf_inside_scan(self): def test_leaf_inside_scan(self):
x = tensor.vector('x') x = tensor.vector('x')
...@@ -97,7 +97,5 @@ class TestMapVariables(object): ...@@ -97,7 +97,5 @@ class TestMapVariables(object):
s2, = map_variables(self.replacer, [s]) s2, = map_variables(self.replacer, [s])
f = theano.function([x, y, z], [s, s2]) f = theano.function([x, y, z], [s, s2])
assert numpy.array_equal( rval = f(x=numpy.array([1, 2, 3]), y=1, z=2)
f(x=numpy.array([1, 2, 3]), y=1, z=2), assert numpy.array_equal(rval, [[1, 2, 3], [2, 4, 6]])
[[ 1, 2, 3],
[ 2, 4, 6]])
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论