isinf¶
- isinf(x: array, /) array¶
Tests each element
x_iof the input arrayxto determine if 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. 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 isTrue.In the remaining cases, the result is
False.
For complex floating-point operands, let
a = real(x_i),b = imag(x_i), andIf
ais either+infinityor-infinityandbis any value (includingNaN), the result isTrue.If
ais either a finite number orNaNandbis either+infinityor-infinity, the result isTrue.In the remaining cases, the result is
False.
Changed in version 2022.12: Added complex data type support.