latest (dev)
Copy
Latest development documentation · Updated 2026-10-15
tensorplay.functional.isinf
- tensorplay.functional.isinf(input) Tensor[source]
Tests if each element of
inputis infinite (positive or negative infinity) or not.Note
Complex values are infinite when their real or imaginary part is infinite.
- Parameters:
input (Tensor) – the input tensor.
- Returns:
A boolean tensor that is True where
inputis infinite and False elsewhere
Example:
>>> tensorplay.isinf(tensorplay.tensor([1, float('inf'), 2, float('-inf'), float('nan')])) tensor([False, True, False, True, False])
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?

