This is documentation for an old release of NumPy (version 1.6.0). Read this page in the documentation of the latest stable release (version > 1.17).
Returns a bool array, where True if input element is real.
If element has complex type with zero complex part, the return value for that element is True.
Parameters : | x : array_like
|
---|---|
Returns : | out : ndarray, bool
|
Examples
>>> np.isreal([1+1j, 1+0j, 4.5, 3, 2, 2j])
array([False, True, True, True, True, False], dtype=bool)