Array API compatible wrapper for :py:func:`np.isnan `. See its docstring for more information.
(x: Array, /)
| 412 | |
| 413 | |
| 414 | def 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 | |
| 425 | def less(x1: Array, x2: Array, /) -> Array: |