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

Rephrased error message

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