isfinite¶
- isfinite(x: array, /) array¶
Tests each element
x_iof the input arrayxto 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_iis either+infinityor-infinity, the result isFalse.If
x_iisNaN, the result isFalse.If
x_iis a finite number, the result isTrue.
For complex floating-point operands, let
a = real(x_i),b = imag(x_i), andIf
aisNaNorbisNaN, the result isFalse.If
ais either+infinityor-infinityandbis any value, the result isFalse.If
ais any value andbis either+infinityor-infinity, the result isFalse.If
ais a finite number andbis a finite number, the result isTrue.
Changed in version 2022.12: Added complex data type support.