# tensorplay.functional.isinf Source: https://www.tensorplay.cn/docs/generated/tensorplay.functional.isinf.html ```python tensorplay.functional.isinf(input) → Tensor ``` Tests if each element of input is infinite (positive or negative infinity) or not. > **Note** > > Complex values are infinite when their real or imaginary part is infinite. Parameters: input ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor)) – the input tensor. Returns: A boolean tensor that is True where input is infinite and False elsewhere Example: ``` >>> tensorplay.isinf(tensorplay.tensor([1, float('inf'), 2, float('-inf'), float('nan')])) tensor([False, True, False, True, False]) ```