summaryrefslogtreecommitdiff
path: root/numpy/lib/index_tricks.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-06-01 21:11:10 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-06-01 21:11:10 +0000
commit9f88ecbc10e7a1f56e2eb1b8445184263111a1cf (patch)
treef832339e857c4629da3161919f2844d1f65eddac /numpy/lib/index_tricks.py
parent5a85dd3d9557c5aa4119ced4ebd47e0e8e3f1142 (diff)
downloadnumpy-9f88ecbc10e7a1f56e2eb1b8445184263111a1cf.tar.gz
Comment changes and change var and std to divide by N instead of N-1
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