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

Function isnan

numpy/array_api/_elementwise_functions.py:414–422  ·  view source on GitHub ↗

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

(x: Array, /)

Source from the content-addressed store, hash-verified

412
413
414def isnan(x: Array, /) -> Array:
415 """
416 Array API compatible wrapper for :py:func:`np.isnan <numpy.isnan>`.
417
418 See its docstring for more information.
419 """
420 if x.dtype not in _numeric_dtypes:
421 raise TypeError("Only numeric dtypes are allowed in isnan")
422 return Array._new(np.isnan(x._array))
423
424
425def less(x1: Array, x2: Array, /) -> Array:

Callers 10

test_nan_interiorMethod · 0.90
test_retstepMethod · 0.90
smallest_normalMethod · 0.85
iscloseFunction · 0.85
array_equalFunction · 0.85
nan_to_numFunction · 0.85
condFunction · 0.85
assert_equalFunction · 0.85
assert_almost_equalFunction · 0.85
assert_approx_equalFunction · 0.85

Calls 1

_newMethod · 0.80

Tested by 2

test_nan_interiorMethod · 0.72
test_retstepMethod · 0.72