maxframe.tensor.isreal#
- maxframe.tensor.isreal(x, **kwargs)[source]#
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.
- Parameters:
x (array_like) – Input tensor.
- Returns:
out – Boolean tensor of same shape as x.
- Return type:
Tensor, bool
Examples
>>> import maxframe.tensor as mt
>>> mt.isreal([1+1j, 1+0j, 4.5, 3, 2, 2j]).execute() array([False, True, True, True, True, False])