message: expand narrow matrix conjugate-transpose test to complex128
diff: @@ -122,24 +122,21 @@ class BatchMatrixTransposeTest(test_util.TensorFlowTestCase):
  with self.assertRaisesRegex(ValueError, "should be a "):
  array_ops.matrix_transpose(vector)
  - def testNarrowMatrixTranspose(self):
  - vector = math_ops.complex(0., math_ops.range(96, dtype=dtypes.float32))
  + def testNarrowMatrixConjugateTranspose(self):
  + for dtype in (dtypes.float32, dtypes.float64):
  + for conjugate in (True, False):
  + with self.subTest(complex_type=dtype, conjugate=conjugate):
  + vector = math_ops.complex(constant_op.constant(0, dtype=dtype),
  + math_ops.range(96, dtype=dtype))
  column_vector = array_ops.expand_dims(vector, axis=-1)
  row_vector = array_ops.expand_dims(vector, axis=0)
  - narrow_matrix = array_ops.tile(column_vector, [1, 2]) # shape [96, 2]
  - expected_transposed = array_ops.tile(row_vector, [2, 1]) # shape [2, 96]
  - transposed = array_ops.matrix_transpose(narrow_matrix)
  -
  - self.assertEqual((2, 96), transposed.get_shape())
  - self.assertAllEqual(expected_transposed, transposed)
  + narrow_matrix = array_ops.tile(column_vector, [1, 2]) # [96, 2]
  + expected_transposed = array_ops.tile(row_vector, [2, 1]) # [2, 96]
  + if conjugate:
  + expected_transposed = -expected_transposed
  - def testNarrowMatrixConjugateTranspose(self):
  - vector = math_ops.complex(0., math_ops.range(96, dtype=dtypes.float32))
  - column_vector = array_ops.expand_dims(vector, axis=-1)
  - row_vector = -array_ops.expand_dims(vector, axis=0)
  - narrow_matrix = array_ops.tile(column_vector, [1, 2]) # shape [96, 2]
  - expected_transposed = array_ops.tile(row_vector, [2, 1]) # shape [2, 96]
  - transposed = array_ops.matrix_transpose(narrow_matrix, conjugate=True)
  + transposed = array_ops.matrix_transpose(narrow_matrix,
  + conjugate=conjugate)
  self.assertEqual((2, 96), transposed.get_shape())
  self.assertAllEqual(expected_transposed, transposed)
  