Exemplo n.º 1
0
 def run_test(arr, *args, **kwargs):
   for fn in self.array_transforms:
     arg = fn(arr)
     self.match(
         np_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)))
Exemplo n.º 2
0
def isreal(x):
    return np_array_ops.imag(x) == 0
Exemplo n.º 3
0
def iscomplex(x):
    return np_array_ops.imag(x) != 0