Pylint fix

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
Yong Tang 2018-12-01 21:04:41 +00:00
parent a7cd4dbea9
commit 676c6ea316

View File

@ -804,10 +804,12 @@ class SparseMathOpsTest(test_util.TensorFlowTestCase):
# Test case for GitHub 24072.
with self.session(use_gpu=False):
a = array_ops.ones([3, 4, 1], dtype=dtypes.int32)
b = sparse_tensor.SparseTensor([[0, 0, 1, 0], [0, 0, 3, 0]], [10, 20], [1, 1, 4, 2])
b = sparse_tensor.SparseTensor(
[[0, 0, 1, 0], [0, 0, 3, 0]], [10, 20], [1, 1, 4, 2])
c = a * b
with self.assertRaisesRegexp(errors.InvalidArgumentError,
"broadcasts dense to sparse only; got incompatible shapes"):
with self.assertRaisesRegexp(
errors.InvalidArgumentError,
"broadcasts dense to sparse only; got incompatible shapes"):
c.eval()
@test_util.run_deprecated_v1