diff options
Diffstat (limited to 'tensorflow/python/ops/histogram_ops.py')
-rw-r--r-- | tensorflow/python/ops/histogram_ops.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tensorflow/python/ops/histogram_ops.py b/tensorflow/python/ops/histogram_ops.py index b2de2e5015..f079e56b10 100644 --- a/tensorflow/python/ops/histogram_ops.py +++ b/tensorflow/python/ops/histogram_ops.py @@ -74,7 +74,7 @@ def histogram_fixed_width_bins(values, ``` """ with ops.name_scope(name, 'histogram_fixed_width_bins', - [values, value_range, nbins]) as scope: + [values, value_range, nbins]): values = ops.convert_to_tensor(values, name='values') shape = array_ops.shape(values) @@ -84,9 +84,10 @@ def histogram_fixed_width_bins(values, nbins_float = math_ops.cast(nbins, values.dtype) # Map tensor values that fall within value_range to [0, 1]. - scaled_values = math_ops.truediv(values - value_range[0], - value_range[1] - value_range[0], - name='scaled_values') + scaled_values = math_ops.truediv( + values - value_range[0], + value_range[1] - value_range[0], + name='scaled_values') # map tensor values within the open interval value_range to {0,.., nbins-1}, # values outside the open interval will be zero or less, or nbins or more. @@ -138,5 +139,5 @@ def histogram_fixed_width(values, """ with ops.name_scope(name, 'histogram_fixed_width', [values, value_range, nbins]) as name: - return gen_math_ops._histogram_fixed_width(values, value_range, nbins, - dtype=dtype, name=name) + return gen_math_ops._histogram_fixed_width( # pylint: disable=protected-access + values, value_range, nbins, dtype=dtype, name=name) |