Change 'must a Tensor' to 'must be a Tensor' in TypeError message

This commit is contained in:
Stephen Matthews 2021-01-29 19:24:50 +00:00
parent 1717052357
commit 84e7eb0a19

View File

@ -3282,10 +3282,10 @@ def _indexed_case_verify_and_canonicalize_args(branch_fns, default,
branch_fns: validated list of callables for each branch (default last).
"""
if not isinstance(branch_index, ops.Tensor):
raise TypeError("branch_index must a Tensor, got {}".format(
raise TypeError("branch_index must be a Tensor, got {}".format(
type(branch_index)))
if not branch_index.dtype.is_integer:
raise TypeError("branch_index must an integer Tensor, got {}".format(
raise TypeError("branch_index must be an integer Tensor, got {}".format(
branch_index.dtype))
if not branch_fns: