# tensorplay.is_tensor Source: https://www.tensorplay.cn/docs/generated/tensorplay.is_tensor.html ```python tensorplay.is_tensor(obj: Any, /) → TypeIs[Tensor] ``` Returns True if obj is a TensorPlay tensor. Note that this function is simply doing isinstance(obj, Tensor). Using that isinstance check is better for type checking with mypy, and more explicit - so it’s recommended to use that instead of is_tensor. Parameters: obj ([object](https://docs.python.org/3/builtins/functions.html#object)) – Object to test Example: ``` >>> x = tensorplay.tensor([1, 2, 3]) >>> tensorplay.is_tensor(x) True ```