diff options
author | czgdp1807 <gdp.1807@gmail.com> | 2021-06-08 14:57:04 +0530 |
---|---|---|
committer | czgdp1807 <gdp.1807@gmail.com> | 2021-06-08 14:57:04 +0530 |
commit | 1a92ae9044ea0de673c159a17f9498297565d3fa (patch) | |
tree | 4763c4679fa1e426b43acf828b8cf65e8e929639 /numpy/lib/index_tricks.py | |
parent | e828f1569dd65cb8a93a619fc89edec582c744cc (diff) | |
parent | 8f1eff4d9b09741d1e989e8118d67af4de7990c5 (diff) | |
download | numpy-1a92ae9044ea0de673c159a17f9498297565d3fa.tar.gz |
Merge branch 'main' into never_copy
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) |