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

