This symbol is a type alias.
TensorLike = Union[ tensorflow.python.types.core.Tensor, tensorflow.python.types.core.TensorProtocol, int, float, bool, str, complex, tuple, list, numpy.ndarray ]
This definition may be used in user code. Additional types may be added in the future as more input types are supported.
def foo(x: TensorLike): pass
This definition passes static type verification for:
foo(tf.constant([1, 2, 3])) foo([1, 2, 3]) foo(np.array([1, 2, 3]))