Array API compatible wrapper for :py:func:`np.isfinite `. See its docstring for more information.
(x: Array, /)
| 390 | |
| 391 | |
| 392 | def 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 | |
| 403 | def isinf(x: Array, /) -> Array: |
no test coverage detected