mindspore.ops.isposinf

View Source On Gitee
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

>>> from mindspore import ops, Tensor
>>> from mindspore import dtype as mstype
>>> output = ops.isposinf(Tensor([[-float("inf"), float("inf")], [1, float("inf")]], mstype.float32))
>>> print(output)
[[False  True]
 [False  True]]