From bdca561c273d3749a8359763c157daa850af138c Mon Sep 17 00:00:00 2001 From: Jianfei Wang Date: Mon, 8 May 2017 02:02:58 +0800 Subject: [PATCH] Fix tf.meshgrid documentation (#9740) The original document has the wrong output regarding the default indexing xy. x = [1, 2, 3] y = [4, 5, 6] X, Y = tf.meshgrid(x, y) print(X.eval()) print(Y.eval()) [[1 2 3] [1 2 3] [1 2 3]] [[4 4 4] [5 5 5] [6 6 6]] --- tensorflow/python/ops/array_ops.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tensorflow/python/ops/array_ops.py b/tensorflow/python/ops/array_ops.py index 5ac630c321c..dad5b9dc0db 100644 --- a/tensorflow/python/ops/array_ops.py +++ b/tensorflow/python/ops/array_ops.py @@ -1690,21 +1690,21 @@ def meshgrid(*args, **kwargs): results in ```prettyprint - X = [[1, 1, 1], - [2, 2, 2], - [3, 3, 3]] - Y = [[4, 5, 6], - [4, 5, 6], - [4, 5, 6]] + X = [[1, 2, 3], + [1, 2, 3], + [1, 2, 3]] + Y = [[4, 4, 4], + [5, 5, 5], + [6, 6, 6]] ``` Args: - *args: `Tensor`s with rank 1 - indexing: Either 'xy' or 'ij' (optional, default: 'xy') + *args: `Tensor`s with rank 1. + indexing: Either 'xy' or 'ij' (optional, default: 'xy'). name: A name for the operation (optional). Returns: - outputs: A list of N `Tensor`s with rank N + outputs: A list of N `Tensor`s with rank N. """ indexing = kwargs.pop("indexing", "xy")