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

Replace operator_div with operator.truediv

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