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,9 +804,11 @@ class SparseMathOpsTest(test_util.TensorFlowTestCase):
# Test case for GitHub 24072. # Test case for GitHub 24072.
with self.session(use_gpu=False): with self.session(use_gpu=False):
a = array_ops.ones([3, 4, 1], dtype=dtypes.int32) 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 c = a * b
with self.assertRaisesRegexp(errors.InvalidArgumentError, with self.assertRaisesRegexp(
errors.InvalidArgumentError,
"broadcasts dense to sparse only; got incompatible shapes"): "broadcasts dense to sparse only; got incompatible shapes"):
c.eval() c.eval()