diff options
author | Matti Picus <matti.picus@gmail.com> | 2021-06-07 20:36:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-07 20:36:58 +0300 |
commit | b9808ca4fe5135db148005f2d20b8b662d7db0e4 (patch) | |
tree | bfd156c9bddc2d0f8817195deba11efd47611977 /numpy/lib/index_tricks.py | |
parent | 4635fc852976243dc2ff7426739a288c72149c2c (diff) | |
parent | e213ccdcb017fa7cf7f04a84769bc538a7f6fe63 (diff) | |
download | numpy-b9808ca4fe5135db148005f2d20b8b662d7db0e4.tar.gz |
Merge pull request #19186 from AhmetCanSolak/ndindex-docs-fix
DOC: ndindex class docstrings fix
Diffstat (limited to 'numpy/lib/index_tricks.py')
-rw-r--r-- | numpy/lib/index_tricks.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py index 72d8e9de4..5140ffa61 100644 --- a/numpy/lib/index_tricks.py +++ b/numpy/lib/index_tricks.py @@ -631,7 +631,8 @@ class ndindex: Examples -------- - # dimensions as individual arguments + Dimensions as individual arguments + >>> for index in np.ndindex(3, 2, 1): ... print(index) (0, 0, 0) @@ -641,7 +642,8 @@ class ndindex: (2, 0, 0) (2, 1, 0) - # same dimensions - but in a tuple (3, 2, 1) + Same dimensions - but in a tuple ``(3, 2, 1)`` + >>> for index in np.ndindex((3, 2, 1)): ... print(index) (0, 0, 0) |