mlx.core.isfinite#

isfinite(a: array, stream: None | Stream | Device = None) array#

Return a boolean array indicating which elements are finite.

An element is finite if it is not infinite or NaN.

Parameters:

a (array) – Input array.

Returns:

The boolean array indicating which elements are finite.

Return type:

array