From 72317f192d23fcab7054c2ba418d7cbea9ec0ea6 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Tue, 21 Jan 2020 17:24:15 +0000 Subject: [PATCH] Update test case and set non-zero imag part of the complex number from review comment feedback Signed-off-by: Yong Tang --- .../python/kernel_tests/extract_image_patches_op_test.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tensorflow/python/kernel_tests/extract_image_patches_op_test.py b/tensorflow/python/kernel_tests/extract_image_patches_op_test.py index a5096907931..dbef0185acc 100644 --- a/tensorflow/python/kernel_tests/extract_image_patches_op_test.py +++ b/tensorflow/python/kernel_tests/extract_image_patches_op_test.py @@ -128,8 +128,12 @@ class ExtractImagePatches(test.TestCase): def testComplexDataTypes(self): """Test for complex data types""" for dtype in [np.complex64, np.complex128]: - image = np.reshape(range(120), [2, 3, 4, 5]).astype(dtype) - patches = np.reshape(range(120), [2, 3, 4, 5]).astype(dtype) + image = ( + np.reshape(range(120), [2, 3, 4, 5]).astype(dtype) + + np.reshape(range(120, 240), [2, 3, 4, 5]).astype(dtype) * 1j) + patches = ( + np.reshape(range(120), [2, 3, 4, 5]).astype(dtype) + + np.reshape(range(120, 240), [2, 3, 4, 5]).astype(dtype) * 1j) for padding in ["VALID", "SAME"]: self._VerifyValues( image,