summaryrefslogtreecommitdiff
path: root/numpy/lib/index_tricks.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/index_tricks.py')
-rw-r--r--numpy/lib/index_tricks.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py
index 6f9d14e3e..c1516a976 100644
--- a/numpy/lib/index_tricks.py
+++ b/numpy/lib/index_tricks.py
@@ -18,9 +18,9 @@ makemat = matrix.matrix
# contributed by Stefan van der Walt
def unravel_index(x,dims):
- """Convert a flat index into an index tuple for a matrix of given shape.
+ """Convert a flat index into an index tuple for an array of given shape.
- e.g. for a 2x2 matrix, unravel_index(2,(2,2)) returns (1,0).
+ e.g. for a 2x2 array, unravel_index(2,(2,2)) returns (1,0).
Example usage:
p = x.argmax()
@@ -314,6 +314,7 @@ class ndenumerate(object):
def __iter__(self):
return self
+
class ndindex(object):
"""Pass in a sequence of integers corresponding
to the number of dimensions in the counter. This iterator