MCPcopy Create free account
hub / github.com/numpy/numpy / isinf

Function isinf

numpy/array_api/_elementwise_functions.py:403–411  ·  view source on GitHub ↗

Array API compatible wrapper for :py:func:`np.isinf `. See its docstring for more information.

(x: Array, /)

Source from the content-addressed store, hash-verified

401
402
403def isinf(x: Array, /) -> Array:
404 """
405 Array API compatible wrapper for :py:func:`np.isinf <numpy.isinf>`.
406
407 See its docstring for more information.
408 """
409 if x.dtype not in _numeric_dtypes:
410 raise TypeError("Only numeric dtypes are allowed in isinf")
411 return Array._new(np.isinf(x._array))
412
413
414def isnan(x: Array, /) -> Array:

Callers 2

compareFunction · 0.90
fillFormatMethod · 0.85

Calls 1

_newMethod · 0.80

Tested by

no test coverage detected