mars.tensor.isreal¶
- mars.tensor.isreal(x, **kwargs)[源代码]¶
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
实际案例
>>> import mars.tensor as mt
>>> mt.isreal([1+1j, 1+0j, 4.5, 3, 2, 2j]).execute() array([False, True, True, True, True, False])