diff --git a/tensorflow/python/ops/math_ops.py b/tensorflow/python/ops/math_ops.py index 6559929560c..3cd82d60417 100644 --- a/tensorflow/python/ops/math_ops.py +++ b/tensorflow/python/ops/math_ops.py @@ -736,10 +736,9 @@ def cast(x, dtype, name=None): values_cast = cast(x.values, base_type, name=name) return sparse_tensor.SparseTensor(x.indices, values_cast, x.dense_shape) else: - # TODO(touts): Handle what Josh said. - # - # Could return ops.convert_to_tensor(x, dtype=dtype, ...) here, but that - # allows some conversions that cast() can't do, e.g. casting numbers to + # TODO(josh11b): If x is not already a Tensor, we could return + # ops.convert_to_tensor(x, dtype=dtype, ...) here, but that + # allows some conversions that cast() can't do, e.g. casting numbers to # strings. x = ops.convert_to_tensor(x, name="x") if x.dtype.base_dtype == base_type: