From 4e5545f0bcc654fb0c6752dcf72120e6e7340d28 Mon Sep 17 00:00:00 2001 From: Gabor Kovacs Date: Sat, 23 Aug 2014 17:50:10 +0100 Subject: DOC: Update docs. Update docs for boolean array indexing and nonzero order. Add links to row-major and column-major terms where they appear. Closes #3177 --- numpy/add_newdocs.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'numpy/add_newdocs.py') diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py index 11a2688e5..75f88a85f 100644 --- a/numpy/add_newdocs.py +++ b/numpy/add_newdocs.py @@ -28,9 +28,9 @@ add_newdoc('numpy.core', 'flatiter', It allows iterating over the array as if it were a 1-D array, either in a for-loop or by calling its `next` method. - Iteration is done in C-contiguous style, with the last index varying the - fastest. The iterator can also be indexed using basic slicing or - advanced indexing. + Iteration is done in row-major, C-style order (the last + index varying the fastest). The iterator can also be indexed using + basic slicing or advanced indexing. See Also -------- @@ -745,8 +745,9 @@ add_newdoc('numpy.core.multiarray', 'empty', dtype : data-type, optional Desired output data-type. order : {'C', 'F'}, optional - Whether to store multi-dimensional data in C (row-major) or - Fortran (column-major) order in memory. + Whether to store multi-dimensional data in row-major + (C-style) or column-major (Fortran-style) order in + memory. Returns ------- @@ -2419,7 +2420,7 @@ add_newdoc('numpy.core.multiarray', 'ndarray', strides : tuple of ints, optional Strides of data in memory. order : {'C', 'F'}, optional - Row-major or column-major order. + Row-major (C-style) or column-major (Fortran-style) order. Attributes ---------- @@ -3564,9 +3565,9 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('flatten', Parameters ---------- order : {'C', 'F', 'A'}, optional - Whether to flatten in C (row-major), Fortran (column-major) order, - or preserve the C/Fortran ordering from `a`. - The default is 'C'. + Whether to flatten in row-major (C-style) or + column-major (Fortran-style) order or preserve the + C/Fortran ordering from `a`. The default is 'C'. Returns ------- @@ -5144,8 +5145,9 @@ add_newdoc('numpy.core.multiarray', 'ravel_multi_index', In 'clip' mode, a negative index which would normally wrap will clip to 0 instead. order : {'C', 'F'}, optional - Determines whether the multi-index should be viewed as indexing in - C (row-major) order or FORTRAN (column-major) order. + Determines whether the multi-index should be viewed as + indexing in row-major (C-style) or column-major + (Fortran-style) order. Returns ------- @@ -5194,9 +5196,8 @@ add_newdoc('numpy.core.multiarray', 'unravel_index', The shape of the array to use for unraveling ``indices``. order : {'C', 'F'}, optional .. versionadded:: 1.6.0 - Determines whether the indices should be viewed as indexing in - C (row-major) order or FORTRAN (column-major) order. + row-major (C-style) or column-major (Fortran-style) order. Returns ------- -- cgit v1.2.1