dpnp.isneginf

dpnp.isneginf(x, out=None)[source]

Test element-wise for negative infinity, return result as bool array.

For full documentation refer to numpy.isneginf.

Parameters:
  • x ({dpnp.ndarray, usm_ndarray}) -- Input array.

  • out ({None, dpnp.ndarray, usm_ndarray}, optional) -- A location into which the result is stored. If provided, it must have a shape that the input broadcasts to and a boolean data type. If not provided or None, a freshly-allocated boolean array is returned. Default: None.

Returns:

out -- Boolean array of same shape as x.

Return type:

dpnp.ndarray

See also

dpnp.isinf

Test element-wise for positive or negative infinity.

dpnp.isposinf

Test element-wise for positive infinity, return result as bool array.

dpnp.isnan

Test element-wise for NaN and return result as a boolean array.

dpnp.isfinite

Test element-wise for finiteness.

Examples

>>> import dpnp as np
>>> x = np.array(np.inf)
>>> np.isneginf(-x)
array(True)
>>> np.isneginf(x)
array(False)
>>> x = np.array([-np.inf, 0., np.inf])
>>> np.isneginf(x)
array([ True, False, False])
>>> x = np.array([-np.inf, 0., np.inf])
>>> y = np.zeros(x.shape, dtype='bool')
>>> np.isneginf(x, y)
array([ True, False, False])
>>> y
array([ True, False, False])