isnan
Test element-wise for NaN.
Returns:
NDArray — Boolean array, true where x is NaN.
isinf
Test element-wise for positive or negative infinity.
Returns:
NDArray — Boolean array, true where x is +Inf or -Inf.
isfinite
Test element-wise for finiteness (not infinity and not NaN).
Returns:
NDArray — Boolean array, true where x is finite.
isneginf
Test element-wise for negative infinity.
Returns:
NDArray — Boolean array, true where x is -Infinity.
isposinf
Test element-wise for positive infinity.
Returns:
NDArray — Boolean array, true where x is +Infinity.
iscomplex
Test element-wise whether values are complex (have non-zero imaginary part).
Returns:
NDArray — Boolean array, true where the element has a non-zero imaginary part.
iscomplexobj
Returntrue if the input is a complex-typed array or has complex dtype.
Returns:
boolean — true if x is an array with complex dtype (complex64 or complex128).
isreal
Test element-wise whether values are real (have zero imaginary part).
Returns:
NDArray — Boolean array, true where the element has zero imaginary part.
isrealobj
Returntrue if the input is not a complex-typed array.
Returns:
boolean — true if x is not a complex array (i.e., dtype is not complex64 or complex128).
isscalar
Returntrue if the input is a scalar value (number, boolean, bigint, or string).
Returns:
boolean — true if element is a scalar type.
isnat
Test element-wise for Not-a-Time. Since numpy-ts does not implement datetime dtypes, this always returnsfalse for every element. Included for API compatibility with NumPy.
Returns:
NDArray — Boolean array of all false values (datetime dtypes are not supported).
isfortran
Returntrue if the array is Fortran-contiguous and not C-contiguous.
Returns:
boolean — true if the array is Fortran-contiguous (column-major) and not C-contiguous. In numpy-ts, arrays are always C-contiguous, so this typically returns false.
iterable
Returntrue if the input can be iterated over.
Returns:
boolean — true if y is iterable (arrays, NDArrays, strings, etc.).
isdtype
Test whether a dtype belongs to a specified kind or set of dtypes.
Returns:
boolean — true if dtype matches the specified kind.
real_if_close
If the imaginary part of an array is close to zero, return only the real part. Otherwise, return the input unchanged.
Returns:
NDArray — Real-valued array if the imaginary part is negligible, otherwise the original array.
Changed in v1.7.0: input that is already real is handed straight back as a view rather than a copy; the complex branches still allocate. This matches NumPy. Writes to the result reach the input array, so call
.copy() if you need an independent buffer. base is set on exactly the results that alias.