mindspore.numpy.isneginf
- mindspore.numpy.isneginf(x)[source]
Tests element-wise for negative infinity, returns result as bool array.
Note
Numpy argument out is not supported. Only np.float32 is currently supported.
- Parameters
x (Tensor) – Input values.
- Returns
Tensor or scalar, true where x is negative infinity, false otherwise. This is a scalar if x is a scalar.
- Raises
TypeError – if the input is not a tensor.
- Supported Platforms:
GPU
CPU
Examples
>>> import mindspore.numpy as np >>> output = np.isneginf(np.array([-np.inf, 0., np.inf, np.nan], np.float32)) >>> print(output) [ True False False False]