mindspore.ops.is_floating_pointļ
- mindspore.ops.is_floating_point(input)[source]ļ
If the data type of the tensor is a floating point data type, return True. Otherwise return False.
- Parameters:
input (Tensor) ā The input Tensor.
- Returns:
Bool
- Supported Platforms:
AscendGPUCPU
Examples
>>> import mindspore >>> input = mindspore.tensor([False, 0j, 1, 2.1, 1+2j], mindspore.float64) >>> mindspore.ops.is_floating_point(input) True >>> >>> input = mindspore.tensor([False, 0j, 1, 2.1, 1+2j], mindspore.float32) >>> mindspore.ops.is_floating_point(input) True >>> >>> input = mindspore.tensor([False, 0j, 1, 2.1, 1+2j], mindspore.float16) >>> mindspore.ops.is_floating_point(input) True >>> >>> input = mindspore.tensor([False, 0j, 1, 2.1, 1+2j], mindspore.int32) >>> mindspore.ops.is_floating_point(input) False