From 6e402d0d2c50a372d6731dafffcac9df25847bb1 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Fri, 8 Sep 2017 15:02:56 -0700 Subject: [PATCH] Make TODO a bit more specific. PiperOrigin-RevId: 168051381 --- tensorflow/python/ops/math_ops.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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: