Merge pull request #46796 from stephengmatthews:typeerror-message
PiperOrigin-RevId: 355072441 Change-Id: I43742e57929b36c061918897be5b766853243060
This commit is contained in:
commit
f9a5623d77
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user