oneflow.is_tensor¶
-
oneflow.is_tensor(input) -> (bool)¶ Note that this function is simply doing
isinstance(obj, Tensor). Using thatisinstancecheck is better for typechecking with mypy, and more explicit - so it’s recommended to use that instead ofis_tensor.- Parameters
obj (Object) – Object to test
For example:
>>> import oneflow as flow >>> x=flow.tensor([1,2,3]) >>> flow.is_tensor(x) True