提交 bb6662bf authored 作者: Pascal Lamblin's avatar Pascal Lamblin

In integer division warning, print the line where the div op was called.

上级 06ebd1ac
...@@ -1056,7 +1056,8 @@ def int_or_true_div(x_discrete, y_discrete): ...@@ -1056,7 +1056,8 @@ def int_or_true_div(x_discrete, y_discrete):
"please use x // y for an integer division " "please use x // y for an integer division "
"(set `config.int_division = raise` to track the origin " "(set `config.int_division = raise` to track the origin "
"of this warning)", "of this warning)",
DeprecationWarning) DeprecationWarning,
stacklevel=4)
return 'int' return 'int'
elif config.int_division == 'floatX': elif config.int_division == 'floatX':
return 'true' return 'true'
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论