提交 376b91fd authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Ensure the output is a (0-dim) ndarray.

上级 06ba1976
...@@ -785,7 +785,7 @@ class GetItemScalar(gof.op.Op): ...@@ -785,7 +785,7 @@ class GetItemScalar(gof.op.Op):
def perform(self, node, (x, ind1, ind2), (out, )): def perform(self, node, (x, ind1, ind2), (out, )):
assert _is_sparse(x) assert _is_sparse(x)
out[0] = x[ind1, ind2] out[0] = theano._asarray(x[ind1, ind2], x.dtype)
def __str__(self): def __str__(self):
return self.__class__.__name__ return self.__class__.__name__
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论