提交 639534c9 authored 作者: Frédéric Bastien's avatar Frédéric Bastien

Merge pull request #3639 from albertz/patch-1

fix get_scalar_constant_value error message
...@@ -764,11 +764,11 @@ def get_scalar_constant_value(orig_v, elemwise=True, ...@@ -764,11 +764,11 @@ def get_scalar_constant_value(orig_v, elemwise=True,
if not (idx < len(gp_broadcastable)): if not (idx < len(gp_broadcastable)):
msg = ("get_scalar_constant_value detected " + msg = ("get_scalar_constant_value detected " +
"deterministic IndexError: x.shape[%d] " + "deterministic IndexError: x.shape[%d] " +
"when x.ndim=%d.") % (ndim, idx) "when x.ndim=%d.") % (idx, ndim)
if config.exception_verbosity == 'high': if config.exception_verbosity == 'high':
msg += 'x=%s' % min_informative_str(v) msg += ' x=%s' % min_informative_str(v)
else: else:
msg += 'x=%s' % str(v) msg += ' x=%s' % str(v)
raise ValueError(msg) raise ValueError(msg)
if gp_broadcastable[idx]: if gp_broadcastable[idx]:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论