Internal change
PiperOrigin-RevId: 311439232
Change-Id: Ieed3345eef5dc74a2b0cc4805ed5269bf775a405
diff --git a/tensorflow/python/ops/math_ops.py b/tensorflow/python/ops/math_ops.py
index 749aa89..4c4982c 100644
--- a/tensorflow/python/ops/math_ops.py
+++ b/tensorflow/python/ops/math_ops.py
@@ -82,7 +82,6 @@
from tensorflow.python.framework import ops
from tensorflow.python.framework import sparse_tensor
from tensorflow.python.framework import tensor_shape
-from tensorflow.python.framework import tensor_util
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import gen_array_ops
from tensorflow.python.ops import gen_data_flow_ops
@@ -439,9 +438,6 @@
# override names. Use a dummy class to track the runtime division behavior
return DivideDelegateWithName(x, name) / y
else:
- # We do conversion here to make sure at least x is a tensor.
- if not tensor_util.is_tensor(x):
- x = ops.convert_to_tensor(x)
return x / y
diff --git a/tensorflow/python/ops/math_ops_test.py b/tensorflow/python/ops/math_ops_test.py
index 6171ea0..2405eec 100644
--- a/tensorflow/python/ops/math_ops_test.py
+++ b/tensorflow/python/ops/math_ops_test.py
@@ -495,12 +495,6 @@
# Consistent with desire to get numerator
self.assertAllEqual(tf_result, expanded_nums)
- def testWithPythonValue(self):
- # Test case for GitHub issue 39475:
- # https://github.com/tensorflow/tensorflow/issues/39475
- x = math_ops.divide(5, 2)
- self.assertTrue(isinstance(x, ops.Tensor))
-
@test_util.run_all_in_graph_and_eager_modes
class DivNoNanTest(test_util.TensorFlowTestCase):