提交 b4c51eb2 authored 作者: Brandon T. Willard's avatar Brandon T. Willard

Rename as_variable to is_variable in test.gof.test_opt

上级 4a6192db
......@@ -22,7 +22,7 @@ from theano.tensor.subtensor import AdvancedSubtensor
from theano.tensor.opt import constant_folding
def as_variable(x):
def is_variable(x):
if not isinstance(x, Variable):
raise TypeError("not a Variable", x)
return x
......@@ -52,7 +52,7 @@ class MyOp(Op):
self.x = x
def make_node(self, *inputs):
inputs = list(map(as_variable, inputs))
inputs = list(map(is_variable, inputs))
for input in inputs:
if not isinstance(input.type, MyType):
raise Exception("Error 1")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论