Пример #1
0
 def run_test(arr, *args, **kwargs):
     for fn in self.array_transforms:
         arg = fn(arr)
         self.match(
             array_ops.imag(arg, *args, **kwargs),
             # np.imag may return a scalar so we convert to a np.ndarray.
             np.array(np.imag(arg, *args, **kwargs)))
Пример #2
0
def isreal(x):
    return array_ops.imag(x) == 0
Пример #3
0
def iscomplex(x):
    return array_ops.imag(x) != 0