mindspore.ops.isneginf

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

Return a boolean tensor indicating which elements are negative 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

>>> import mindspore
>>> input = mindspore.tensor([-1, 3, float("inf"), float("-inf"), float("nan")])
>>> mindspore.ops.isneginf(input)
Tensor(shape=[5], dtype=Bool, value= [False, False, False,  True, False])