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

Function isfinite

numpy/array_api/_elementwise_functions.py:392–400  ·  view source on GitHub ↗

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

(x: Array, /)

Source from the content-addressed store, hash-verified

390
391
392def isfinite(x: Array, /) -> Array:
393 """
394 Array API compatible wrapper for :py:func:`np.isfinite <numpy.isfinite>`.
395
396 See its docstring for more information.
397 """
398 if x.dtype not in _numeric_dtypes:
399 raise TypeError("Only numeric dtypes are allowed in isfinite")
400 return Array._new(np.isfinite(x._array))
401
402
403def isinf(x: Array, /) -> Array:

Callers 5

assert_almost_equalFunction · 0.90
assert_approx_equalFunction · 0.90
fillFormatMethod · 0.85
iscloseFunction · 0.85
_assert_finiteFunction · 0.85

Calls 1

_newMethod · 0.80

Tested by

no test coverage detected