maxframe.tensor.iscomplex#
- maxframe.tensor.iscomplex(x, **kwargs)[source]#
Returns a bool tensor, where True if input element is complex.
What is tested is whether the input has a non-zero imaginary part, not if the input type is complex.
- Parameters:
x (array_like) – Input tensor.
- Returns:
out – Output tensor.
- Return type:
Tensor of bools
Examples
>>> import maxframe.tensor as mt
>>> mt.iscomplex([1+1j, 1+0j, 4.5, 3, 2, 2j]).execute() array([ True, False, False, False, False, True])