Example #1
0
 def run_test(arr, axes=None):
     for fn1 in self.array_transforms:
         for fn2 in self.array_transforms:
             arr_arg = fn1(arr)
             axes_arg = fn2(axes) if axes is not None else None
             self.match(array_ops.transpose(arr_arg, axes_arg),
                        np.transpose(arr_arg, axes))
Example #2
0
 def run_test(arr, axes=None):
     for fn1 in self.array_transforms:
         for fn2 in self.array_transforms:
             arr_arg = fn1(arr)
             axes_arg = fn2(axes) if axes is not None else None
             # If transpose is called on a Tensor, it calls out to the
             # Tensor.transpose method.
             np_arr_arg = arr_arg
             if isinstance(np_arr_arg, tf.Tensor):
                 np_arr_arg = np_arr_arg.numpy()
             self.match(array_ops.transpose(arr_arg, axes_arg),
                        np.transpose(np_arr_arg, axes))