isfinite

isfinite(x: array, /) array

Tests each element x_i of the input array x to determine if finite (i.e., not NaN and not equal to positive or negative infinity).

Parameters:

x (array) – input array. Should have a numeric data type.

Returns:

out (array) – an array containing test results. An element out_i is True if x_i is finite and False otherwise. The returned array must have a data type of bool.