提交 701f8b54 authored 作者: John Salvatier's avatar John Salvatier

make sure that there's only one index and its 1d

上级 baaa8111
...@@ -1756,12 +1756,7 @@ class _tensor_py_operators: ...@@ -1756,12 +1756,7 @@ class _tensor_py_operators:
break break
if advanced: if advanced:
if (len(args) == 1 if (len(args) == 1 and as_tensor_variable(args[0]).ndim <= 1):
and isinstance(args[0], (
list,
TensorVariable,
TensorConstant,
theano.tensor.sharedvar.TensorSharedVariable))):
return advanced_subtensor1(self, *args) return advanced_subtensor1(self, *args)
else: else:
return AdvancedSubtensor()(self, *args) return AdvancedSubtensor()(self, *args)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论