latest (dev)
Copy
Latest development documentation · Updated 2026-10-15
tensorplay.functional.isreal
- tensorplay.functional.isreal(input) Tensor[source]
Returns a new tensor with boolean elements representing if each element of
inputis real-valued or not. All real-valued types are considered real. Complex values are considered real when their imaginary part is 0.- Parameters:
input (Tensor) – the input tensor.
- Returns:
A boolean tensor that is True where
inputis real and False elsewhere
Example:
>>> tensorplay.isreal(tensorplay.tensor([1, 1+1j, 2+0j])) tensor([True, False, True])
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?

