mindspore.ops.isposinf
- mindspore.ops.isposinf(input)[source]
Return a boolean tensor indicating which elements are positive infinity.
Warning
For Ascend, it is only supported on platforms above Atlas A2.
- Parameters
input (Tensor) – The input tensor.
- Returns
Tensor
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> from mindspore >>> input = mindspore.tensor([-1, 3, float("inf"), float("-inf"), float("nan")]) >>> mindspore.ops.isposinf(input) Tensor(shape=[5], dtype=Bool, value= [False, False, True, False, False])