mars.tensor.
isreal
Returns a bool tensor, where True if input element is real.
If element has complex type with zero complex part, the return value for that element is True.
x (array_like) – Input tensor.
out – Boolean tensor of same shape as x.
Tensor, bool
See also
iscomplex
isrealobj
Return True if x is not a complex type.
Examples
>>> import mars.tensor as mt
>>> mt.isreal([1+1j, 1+0j, 4.5, 3, 2, 2j]).execute() array([False, True, True, True, True, False])