提交 e79d2382 authored 作者: George Ho's avatar George Ho

Replace operator_div with operator.truediv

上级 c41b0f8d
...@@ -69,7 +69,6 @@ from tests.tensor.utils import ( ...@@ -69,7 +69,6 @@ from tests.tensor.utils import (
upcast_int8_nfunc, upcast_int8_nfunc,
) )
from theano import change_flags, compile, config, function, gof, shared from theano import change_flags, compile, config, function, gof, shared
from theano.compat import operator_div
from theano.compile import DeepCopyOp from theano.compile import DeepCopyOp
from theano.compile.mode import get_default_mode from theano.compile.mode import get_default_mode
from theano.scalar import autocast_float, autocast_float_as from theano.scalar import autocast_float, autocast_float_as
...@@ -5601,7 +5600,7 @@ class TestArithmeticCast: ...@@ -5601,7 +5600,7 @@ class TestArithmeticCast:
operator.add, operator.add,
operator.sub, operator.sub,
operator.mul, operator.mul,
operator_div, operator.truediv,
operator.floordiv, operator.floordiv,
): ):
for a_type in dtypes: for a_type in dtypes:
...@@ -5611,7 +5610,7 @@ class TestArithmeticCast: ...@@ -5611,7 +5610,7 @@ class TestArithmeticCast:
# Theano deals with integer division in its own # Theano deals with integer division in its own
# special way (depending on `config.int_division`). # special way (depending on `config.int_division`).
is_int_division = ( is_int_division = (
op is operator_div op is operator.truediv
and a_type in tt.discrete_dtypes and a_type in tt.discrete_dtypes
and b_type in tt.discrete_dtypes and b_type in tt.discrete_dtypes
) )
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论