cupy.isneginf#

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

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

Parameters:
  • x (cupy.ndarray) – Input array.

  • out (cupy.ndarray, optional) – A location into which the result is stored. If provided, it should have a shape that input broadcasts to. By default, None, a freshly- allocated boolean array, is returned.

Returns:

y – Boolean array of same shape as x.

Return type:

cupy.ndarray

Examples

>>> cupy.isneginf(0)
array(False)
>>> cupy.isneginf(-cupy.inf)
array(True)
>>> cupy.isneginf(cupy.array([-cupy.inf, -4, cupy.nan, 0, 4, cupy.inf]))
array([ True, False, False, False, False, False])

See also

numpy.isneginf