isfinite¶
- isfinite(x: array, /) array ¶
Tests each element
x_i
of the input arrayx
to determine if finite.- Parameters:
x (array) – input array. Should have a numeric data type.
- Returns:
out (array) – an array containing test results. The returned array must have a data type of
bool
.
Notes
Special Cases
For real-valued floating-point operands,
If
x_i
is either+infinity
or-infinity
, the result isFalse
.If
x_i
isNaN
, the result isFalse
.If
x_i
is a finite number, the result isTrue
.
For complex floating-point operands, let
a = real(x_i)
,b = imag(x_i)
, andIf
a
isNaN
orb
isNaN
, the result isFalse
.If
a
is either+infinity
or-infinity
andb
is any value, the result isFalse
.If
a
is any value andb
is either+infinity
or-infinity
, the result isFalse
.If
a
is a finite number andb
is a finite number, the result isTrue
.
Changed in version 2022.12: Added complex data type support.