diff --git a/tensorflow/python/ops/math_ops.py b/tensorflow/python/ops/math_ops.py index 2d8285f709c..03c10b37c95 100644 --- a/tensorflow/python/ops/math_ops.py +++ b/tensorflow/python/ops/math_ops.py @@ -439,8 +439,8 @@ def divide(x, y, name=None): # 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 either x or y is a tensor. - if not (tensor_util.is_tensor(x) or tensor_util.is_tensor(y)): + # 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