提交 772c3563 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Rephrased error message

上级 61493b72
......@@ -1034,11 +1034,11 @@ def div_proxy(x, y):
# division"), we will change the semantics of "/" on integer types in
# Theano 0.4. Until then, it is forbidden to use "/" on integers.
raise IntegerDivisionError(
"Dividing two integers with '/' is forbidden until Theano v0.4"
" is released (where the result will be a floating point "
"number). In the meantime, please either use '//' for integer "
"division, or cast one of the arguments to a floating point "
"type for float division.")
"Dividing two integers with '/' is currently forbidden "
"to avoid confusion between integer and floating point "
"divisions. Please either use '//' for integer division, or "
"cast one of the arguments to a floating point type for float "
"division.")
else:
return true_div(x, y)
......
......@@ -2584,11 +2584,11 @@ def div_proxy(x, y):
as_tensor_variable(y).dtype in discrete_dtypes):
# See the same in scalar/basic.py
raise IntegerDivisionError(
"Dividing two integer arrays with '/' is forbidden until "
"Theano v0.4 is released (where the result will be a floating "
"point number). In the meantime, please either use '//' for "
"integer division, or cast one of the arguments to a floating "
"point type for float division.")
"Dividing two integer arrays with '/' is currently forbidden "
"to avoid confusion between integer and floating point "
"divisions. Please either use '//' for integer division, or "
"cast one of the arguments to a floating point type for float "
"division.")
else:
return true_div(x, y)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论