aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/ops/histogram_ops.py
diff options
context:
space:
mode:
authorGravatar Jianwei Xie <xiejw@google.com>2018-01-24 11:31:06 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-01-24 11:35:51 -0800
commitad07a86d75ab06bbcfd6f8f6a24debd9036a52d0 (patch)
tree87041ba0e9c329c3838664345ecc7b5ea1b28787 /tensorflow/python/ops/histogram_ops.py
parent7f8e600bfb4ff5973bd1ec178b65538e2446fb69 (diff)
Fixed linter errors.
PiperOrigin-RevId: 183115307
Diffstat (limited to 'tensorflow/python/ops/histogram_ops.py')
-rw-r--r--tensorflow/python/ops/histogram_ops.py13
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)