numpy.isneginf

numpy.isneginf(x, y=None)

Return True where x is -infinity, and False otherwise.

Parameters:

x : array_like

The input array.

y : array_like

A boolean array with the same shape as x to store the result.

Returns:

y : ndarray

A boolean array where y[i] = True only if x[i] = -Inf.

See also

isposinf, isfinite

Examples

>>> np.isneginf([-np.inf, 0., np.inf])
array([ True, False, False], dtype=bool)

Previous topic

numpy.isnan

Next topic

numpy.isposinf

This Page

Quick search