TensorPlay
latest (dev)
Copy
View Markdown

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 input is a floating point data type i.e., one of tensorplay.float64, tensorplay.float32, tensorplay.float16, and tensorplay.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

On this page

Ask DeepWiki