提交 b4c41d22 authored 作者: affanv14's avatar affanv14

Implement indexing with empty list

上级 70129ffb
......@@ -501,6 +501,8 @@ class _tensor_py_operators(object):
args[ellipsis_at: ellipsis_at + 1] = (
[slice(None)] * (self.ndim - (len(args) - 1 - new_axes)))
args = tuple([numpy.array(inp, dtype=numpy.int64)
if(inp == [] or inp == ()) else inp for inp in args])
# Convert python literals to theano constants
args = theano.tensor.subtensor.make_constant(args)
# Determine if advanced indexing is needed or not
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论