aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/kernel_tests/dynamic_stitch_op_test.py
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2016-08-15 19:34:13 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-08-16 09:56:16 -0700
commit0f7c3b0a886300c332fa66df58b4d4a5d477a4d9 (patch)
tree1480644be31cbbca7d64e44dba12a018948c330a /tensorflow/python/kernel_tests/dynamic_stitch_op_test.py
parent2c5718c133d36440f3dfd005a5d199db342faab8 (diff)
Update generated Python Op docs.
Change: 130356783
Diffstat (limited to 'tensorflow/python/kernel_tests/dynamic_stitch_op_test.py')
-rw-r--r--tensorflow/python/kernel_tests/dynamic_stitch_op_test.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tensorflow/python/kernel_tests/dynamic_stitch_op_test.py b/tensorflow/python/kernel_tests/dynamic_stitch_op_test.py
index 66315335c3..c34cd2ef66 100644
--- a/tensorflow/python/kernel_tests/dynamic_stitch_op_test.py
+++ b/tensorflow/python/kernel_tests/dynamic_stitch_op_test.py
@@ -51,6 +51,18 @@ class DynamicStitchTest(tf.test.TestCase):
# length.
self.assertEqual([None], stitched_t.get_shape().as_list())
+ def testOneListOneDimensional(self):
+ with self.test_session():
+ indices = [tf.constant([1, 6, 2, 3, 5, 0, 4, 7])]
+ data = [tf.constant([10, 60, 20, 30, 50, 0, 40, 70])]
+ stitched_t = tf.dynamic_stitch(indices, data)
+ stitched_val = stitched_t.eval()
+ self.assertAllEqual([0, 10, 20, 30, 40, 50, 60, 70], stitched_val)
+ # Dimension 0 is determined by the max index in indices, so we
+ # can only infer that the output is a vector of some unknown
+ # length.
+ self.assertEqual([None], stitched_t.get_shape().as_list())
+
def testSimpleTwoDimensional(self):
with self.test_session():
indices = [tf.constant([0, 4, 7]),