提交 19107a6b authored 作者: Hengjean's avatar Hengjean

Removed the double index setting (minor)

上级 cd3134be
...@@ -145,7 +145,7 @@ class Insert(Op): ...@@ -145,7 +145,7 @@ class Insert(Op):
assert isinstance(x.type, TypedListType) assert isinstance(x.type, TypedListType)
assert x.ttype == toInsert.type assert x.ttype == toInsert.type
if not isinstance(index, Variable): if not isinstance(index, Variable):
index = index = T.constant(index, ndim=0) index = T.constant(index, ndim=0)
else: else:
assert isinstance(index, T.TensorVariable) and index.ndim == 0 assert isinstance(index, T.TensorVariable) and index.ndim == 0
return Apply(self, [x, index, toInsert], [x.type()]) return Apply(self, [x, index, toInsert], [x.type()])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论