diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2018-05-27 13:40:20 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-27 13:40:20 -0600 |
commit | 69458b02956d39082014573eb0350ae3eb3436ee (patch) | |
tree | 35a05b19a67c4aa67b40a71627eb35470479c796 /doc/source/reference | |
parent | 7d7c71ccae98c448f120d42f372bb2d0d3f10f6a (diff) | |
parent | a10b4270d4b3f538254698874560d645c0525dc5 (diff) | |
download | numpy-69458b02956d39082014573eb0350ae3eb3436ee.tar.gz |
Merge pull request #9686 from eric-wieser/force-tuple
DEP: Deprecate non-tuple nd-indices
Diffstat (limited to 'doc/source/reference')
-rw-r--r-- | doc/source/reference/arrays.indexing.rst | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/doc/source/reference/arrays.indexing.rst b/doc/source/reference/arrays.indexing.rst index b5a44c22a..ba1bfd312 100644 --- a/doc/source/reference/arrays.indexing.rst +++ b/doc/source/reference/arrays.indexing.rst @@ -29,11 +29,15 @@ dimensions. Basic slicing occurs when *obj* is a :class:`slice` object (constructed by ``start:stop:step`` notation inside of brackets), an 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 non-ndarray sequence (such as a :class:`list`) containing :class:`slice` -objects, the :const:`Ellipsis` object, or the :const:`newaxis` object, -but not for integer arrays or other embedded sequences. +well. + +.. deprecated:: 1.15.0 + + In order to remain backward compatible with a common usage in + Numeric, basic slicing is also initiated if the selection object is + any non-ndarray and non-tuple sequence (such as a :class:`list`) containing + :class:`slice` objects, the :const:`Ellipsis` object, or the :const:`newaxis` + object, but not for integer arrays or other embedded sequences. .. index:: triple: ndarray; special methods; getitem @@ -196,7 +200,8 @@ basic slicing that returns a :term:`view`). why this occurs. Also recognize that ``x[[1,2,3]]`` will trigger advanced indexing, - whereas ``x[[1,2,slice(None)]]`` will trigger basic slicing. + whereas due to the deprecated Numeric compatibility mentioned above, + ``x[[1,2,slice(None)]]`` will trigger basic slicing. Integer array indexing ^^^^^^^^^^^^^^^^^^^^^^ |