mindspore.ops.isposinf
- mindspore.ops.isposinf(input)[source]
Tests element-wise for positive infinity.
- Parameters
input (Tensor) – Input values.
- Returns
Tensor, true where input is positive infinity, false otherwise.
- Raises
TypeError – If the input is not a tensor.
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> output = ops.isposinf(Tensor([[-float("inf"), float("inf")], [1, float("inf")]], mstype.float32)) >>> print(output) [[False True] [False True]]