提交 60f286bc authored 作者: Frederic Bastien's avatar Frederic Bastien

fix an error that make some optimization not being done in some case.

上级 3d98b97a
......@@ -2058,7 +2058,10 @@ def local_pow_specialize_device(node):
#it could be that in that case, numpy make the comparaison into the wrong type(do in int8 that overflow.)
if isinstance(y,numpy.ndarray):
assert y.size==1
y = y[0]
try:
y = y[0]
except IndexError:
pass
if (y is not None) \
and encompasses_broadcastable(xsym.type.broadcastable, ysym.type.broadcastable):
rval = None
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论