latest (dev)
Copy
Latest development documentation · Updated 2026-10-15
tensorplay.functional.is_complex
- tensorplay.functional.is_complex(input: Tensor) bool[source]
Returns True if the data type of
inputis a complex data type i.e., one oftensorplay.complex64, andtensorplay.complex128.- Parameters:
input (Tensor) – the input tensor.
Example:
>>> tensorplay.is_complex(tensorplay.tensor([1, 2, 3], dtype=tensorplay.complex64)) True >>> tensorplay.is_complex(tensorplay.tensor([1, 2, 3], dtype=tensorplay.complex128)) True >>> tensorplay.is_complex(tensorplay.tensor([1, 2, 3], dtype=tensorplay.int32)) False >>> tensorplay.is_complex(tensorplay.tensor([1.0, 2.0, 3.0], dtype=tensorplay.float16)) False
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?

