reminisce commented on a change in pull request #8766: NDArray Indexing 
tutorial and Gradient Compression FAQ
URL: https://github.com/apache/incubator-mxnet/pull/8766#discussion_r152464676
 
 

 ##########
 File path: docs/tutorials/basic/ndarray_indexing.md
 ##########
 @@ -0,0 +1,375 @@
+
+# NDArray Indexing - Array indexing features
+
+MXNet's advanced indexing features are modeled after [NumPy's implementation 
and 
documentation](https://docs.scipy.org/doc/numpy-1.13.0/reference/arrays.indexing.html#combining-advanced-and-basic-indexing).
 You will see direct adaptations of many NumPy indexing features, and these are 
close, if not identical.
+
+`NDArray`s can be indexed using the standard Python `x[obj]` syntax, where _x_ 
is the array and _obj_ the selection.
+
+There are three kinds of indexing available:
+
+1. field access
+1. basic slicing
+1. advanced indexing
+
+In MXNet, we support both basic and advanced indexing following the convention 
of indexing NumPy's `ndarray`.
+
+
+## Basic Slicing and Indexing
+
+Basic slicing extends Python?s basic concept of slicing to N dimensions. For a 
quick review:
+
+```
+a[start:end] # items start through end-1
+a[start:]    # items start through the rest of the array
+a[:end]      # items from the beginning through end-1
+a[:]         # a copy of the whole array
+```
+
+
+```python
+import mxnet as mx
 
 Review comment:
   Since `mx.` is not used in the following code examples, you can remove this 
line.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to