summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2014-06-11 21:33:16 +0200
committerJulian Taylor <jtaylor.debian@googlemail.com>2014-06-11 21:41:50 +0200
commit5a52eddbc89820c1abd052612eeb57bf6fdb5901 (patch)
tree78459ce6b287466b453723538d41f336dedf6c25
parent6e2a69bb7a42b0b518f5a54cb949eb0f21c43331 (diff)
downloadnumpy-5a52eddbc89820c1abd052612eeb57bf6fdb5901.tar.gz
DOC: fix a couple mistakes in the indexing documentation
closes gh-618
-rw-r--r--doc/source/reference/arrays.indexing.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/source/reference/arrays.indexing.rst b/doc/source/reference/arrays.indexing.rst
index d04f89897..ef0180e0f 100644
--- a/doc/source/reference/arrays.indexing.rst
+++ b/doc/source/reference/arrays.indexing.rst
@@ -31,9 +31,9 @@ integer, or a tuple of slice objects and integers. :const:`Ellipsis`
and :const:`newaxis` objects can be interspersed with these as
well. In order to remain backward compatible with a common usage in
Numeric, basic slicing is also initiated if the selection object is
-any sequence (such as a :class:`list`) containing :class:`slice`
+any non-ndarray sequence (such as a :class:`list`) containing :class:`slice`
objects, the :const:`Ellipsis` object, or the :const:`newaxis` object,
-but no integer arrays or other embedded sequences.
+but not for integer arrays or other embedded sequences.
.. index::
triple: ndarray; special methods; getslice
@@ -46,8 +46,8 @@ scalar <arrays.scalars>` representing the corresponding item. As in
Python, all indices are zero-based: for the *i*-th index :math:`n_i`,
the valid range is :math:`0 \le n_i < d_i` where :math:`d_i` is the
*i*-th element of the shape of the array. Negative indices are
-interpreted as counting from the end of the array (*i.e.*, if *i < 0*,
-it means :math:`n_i + i`).
+interpreted as counting from the end of the array (*i.e.*, if
+:math:`n_i < 0`, it means :math:`n_i + d_i`).
All arrays generated by basic slicing are always :term:`views <view>`
@@ -84,7 +84,7 @@ concepts to remember include:
- Assume *n* is the number of elements in the dimension being
sliced. Then, if *i* is not given it defaults to 0 for *k > 0* and
- *n* for *k < 0* . If *j* is not given it defaults to *n* for *k > 0*
+ *n - 1* for *k < 0* . If *j* is not given it defaults to *n* for *k > 0*
and -1 for *k < 0* . If *k* is not given it defaults to 1. Note that
``::`` is the same as ``:`` and means select all indices along this
axis.