MCPcopy Create free account
hub / github.com/ml-explore/mlx / isfinite

Function isfinite

mlx/ops.cpp:1853–1858  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1851}
1852
1853array isfinite(const array& a, StreamOrDevice s /* = {} */) {
1854 if (issubdtype(a.dtype(), integer) || a.dtype() == bool_) {
1855 return full(a.shape(), true, bool_, s);
1856 }
1857 return logical_not(logical_or(isinf(a, s), isnan(a, s), s), s);
1858}
1859
1860array isposinf(const array& a, StreamOrDevice s /* = {} */) {
1861 if (issubdtype(a.dtype(), integer) || a.dtype() == bool_) {

Callers 3

init_opsFunction · 0.85
to_fp8_e8m0Function · 0.85
fp8_e8m0Method · 0.85

Calls 6

issubdtypeFunction · 0.85
logical_notFunction · 0.85
logical_orFunction · 0.85
isinfFunction · 0.85
fullFunction · 0.70
isnanFunction · 0.70

Tested by

no test coverage detected