mindspore.ops.isneginf

View Source On Gitee
mindspore.ops.isneginf(input)[source]

Tests element-wise for negative infinity.

Parameters

input (Tensor) – Input Tensor.

Returns

Tensor, true where input is negative 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.isneginf(Tensor([[-float("inf"), float("inf")], [1, -float("inf")]], mstype.float32))
>>> print(output)
[[ True False]
 [False  True]]