This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new 48dcbf2  Improve take documentation. (#9717)
48dcbf2 is described below

commit 48dcbf23ab7d0c1e103a8419ed4e72b1f9d43fa2
Author: Pedro Larroy <928489+lar...@users.noreply.github.com>
AuthorDate: Wed Feb 7 19:58:46 2018 +0100

    Improve take documentation. (#9717)
---
 src/operator/tensor/indexing_op.cc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/operator/tensor/indexing_op.cc 
b/src/operator/tensor/indexing_op.cc
index b90a95d..cce4537 100644
--- a/src/operator/tensor/indexing_op.cc
+++ b/src/operator/tensor/indexing_op.cc
@@ -352,12 +352,16 @@ will have shape ``(i0, i1, d1, d2)``, computed by::
    - `mode`- Only `clip` mode is supported for now.
 
 Examples::
+  x = [4.  5.  6.]
+
+  // Trivial case, take the second element along the first axis.
+  take(x, [1]) = [ 5. ]
 
   x = [[ 1.,  2.],
        [ 3.,  4.],
        [ 5.,  6.]]
 
-  // takes elements with specified indices along axis 0
+  // In this case we will get rows 0 and 1, then 1 and 2. Along axis 0
   take(x, [[0,1],[1,2]]) = [[[ 1.,  2.],
                              [ 3.,  4.]],
 

-- 
To stop receiving notification emails like this one, please contact
j...@apache.org.

Reply via email to